Ordering in script.d directories (was Re: ppp and ip-up.d, ip-down.d)
On Tue, Dec 08, 1998 at 11:05:23AM -0500, firstname.lastname@example.org wrote:
> *- Kenneth MacDonald wrote about "Re: ppp and ip-up.d, ip-down.d"
> > This doesn't allow for services to be stopped in a different order
> > from which they're started, unless you have scripts which only operate
> > on an "up" or "down" PPP_OPERATION, thus giving you two scripts for
> > each service again.
> How about having a ip.d directory that has the actual scripts(similiar
> to init.d) and then directories ip-up.d and ip-down.d with S and K
> symlinks to ip.d(similiar to rc?.d). That way the order could be
Argh, this is so ugly. I've always hated the way init scripts do that.
We should "down" things in the opposite order from the way we "up" them.
I'm not sure how this applies to ppp (can't think of any PPP post-connection
scripts that are really order-dependent), but it's easy to demonstrate with
On startup, for example, we:
fsck/remount root filesystem
mount other filesystems
mount nfs filesystems
On shutdown, we:
umount other filesystems
umount root filesystem
See what's happening? We're building a little tower on startup, and
dismantling it on shutdown. Just think how much more sense
/etc/runlevel.conf would make if we executed kill scripts in order from
higher numbers to lower numbers.