[lkml]   [2005]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Universal method to start a script at boot
On Monday 12 September 2005 14:07, DervishD wrote:
> Hi Denis :)
> * Denis Vlasenko <> dixit:
> > Awful. This codifies ages-old Unix traditional SysV-like init
> > and its derivatives, which should be get rid of instead.
> I'm with you in this, in fact I use my own init system, but...
> > daemontools are absolutely wonderful way of controlling daemons.
> How the heck you make sure that svscan starts the services in the
> correct order?

Simple. Usually I do not, because many of them do not
depend on each other. In cases where I must, I code it
in the script.

This is how do I wait for automount to start before
I mkswap/swapon on a windows nt swapfile:

echo -n "* Setting up swap"
i=9; while test "$i" -gt 0; do
if test -d /mnt/auto/vfat.hda1; then
mkswap /mnt/auto/vfat.hda1/PAGEFILE.SYS
swapon /mnt/auto/vfat.hda1/PAGEFILE.SYS
echo -n "."
sleep 1
let i-=1; done

Probably a small tool can make it look less ugly
(say, 'waitfor <seconds> <cmd> [<param>]'):

if waitfor 10 test -d /mnt/auto/vfat.hda1; then ...; fi

> > Does it run the services in /services in any
> particular order or just in the order resulting for a simple
> globbing? How you make sure the services are shut down in any
> particular order?
> All this seems like requiring scripts to do the job (that is,
> ensuring a particular order of startup/shutdown), while sysvinit
> gets this info from filenames. Obviously, dictating the order using a
> script is far more flexible than using filenames but it's not as
> simple, and that cannot be seen in the comparisons D.J.B. does in the
> homepage of daemontools (which, BTW, is the only source of
> documentation, and a very poor one). LSB, on the other hand, is

djb is crazy genius, what did you expect ;)
There is GPLed replacement of daemontools at

> better structured and although I don't like sysvinit at all, the
> system is better documented. And I hate runlevels...

me too.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-09-12 13:17    [W:0.071 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site