Subject: Re: Implementing periodic.d
To: mouss <usebsd@free.fr>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-userlevel
Date: 04/07/2004 00:44:30
On Wed, 07 Apr 2004 01:15:56 +0200, mouss writes:
>> I also found simple numeric odering adequate - but that seems to irk
>> many - too low tech I guess ;-)
>
>the problem with numeric files is that at start you have 10.foo and
>20.bar, then you add an intermediary 15.blop, then 13.meuh, then
>11.blop, then you wanna add a script between 10.* and 11.* and then you
>got a problem.
Sure, but we learned that one years ago... start with 1000.foo
2000.bar ;-) Also, I keep all the foo's and bars in a directory (rc_d ;-)
so they are easy to find and run directly, and you just have symlinks
in the daily.d etc - worst case is you may have to rename some
symlinks - but you won't need to do it often.
>one thing is that you don't always need ordering. some tasks may depend
>on others of course, but this doesn't justify simplifying the problem by
>requiring a full ordering scheme. A simple model is using stages (this
Sure, so just use the same number for a bunch of links - then its
simple lexical order - it doesn't matter that much - but it will
always be the same. Like I said, bog simple.
For histerical reasons I actually used Snnn.* for a lot of things, but
it doesn't make much difference to this discussion. If I were
starting over I'd probably just use 1000. 2000. etc
>somewhat resembles the old sysv init states, but doesn't have the
>problem of a 0-6 magical numbers) which would then model the ordering
I know its not what you are doing, but I wish people would stop
dragging init and runlevels into any discussion of start/stop scripts
they really are othogonal. It took _years_ longer to get start/stop
scripts in NetBSD because of the repeated assertion that start/stop
scripts meant changes to init. So... I'd rather just leave init out
of this ;-)
--sjg