mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Denis Vlasenko <vda@ilport.com.ua>
To: DervishD <lkml@dervishd.net>
Cc: Michael Clark <michael@metaparadigm.com>,
	Brad Tilley <rtilley@vt.edu>,
	linux-kernel@vger.kernel.org
Subject: Re: Universal method to start a script at boot
Date: Mon, 12 Sep 2005 14:14:31 +0300	[thread overview]
Message-ID: <200509121414.31884.vda@ilport.com.ua> (raw)
In-Reply-To: <20050912110712.GA287@DervishD>

On Monday 12 September 2005 14:07, DervishD wrote:
>     Hi Denis :)
> 
>  * Denis Vlasenko <vda@ilport.com.ua> 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
        echo
        mkswap /mnt/auto/vfat.hda1/PAGEFILE.SYS
        swapon /mnt/auto/vfat.hda1/PAGEFILE.SYS
        exit
    fi
    echo -n "."
    sleep 1
let i-=1; done
echo

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 http://smarden.org/runit/

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

me too.
--
vda

  reply	other threads:[~2005-09-12 11:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1126462329.4324737923c2d@wmtest.cc.vt.edu>
2005-09-11 18:14 ` Brad Tilley
2005-09-12  4:17   ` Michael Clark
2005-09-12  9:49     ` Denis Vlasenko
2005-09-12 11:07       ` DervishD
2005-09-12 11:14         ` Denis Vlasenko [this message]
2005-09-12 13:14           ` DervishD
2005-09-12 12:23         ` linux-os (Dick Johnson)
2005-09-12 11:22       ` Michael Clark
2005-09-12 13:52     ` Brad Tilley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200509121414.31884.vda@ilport.com.ua \
    --to=vda@ilport.com.ua \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@dervishd.net \
    --cc=michael@metaparadigm.com \
    --cc=rtilley@vt.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®