In article <[EMAIL PROTECTED]>, Manoj Srivastava <[EMAIL PROTECTED]> wrote: > *This is opinion*.
Okay ;) > I would not have expected the init.d scripts to be generally > sourced by rc, and woud be surprised not to have them regular > standalone scripts (I often call them manually, as in > # /etc/sendmail reload) Well actually we are only talking about scripts that are executed/sourced during the initial bootup phase - not your regular /etc/init.d scripts, but the ones that are fragments of the previous monolithic /etc/init.d/boot script. I seperated that in 10 or so little fragments. So please consider that we're not discussing the general /etc/init.d/bla start|stop scripts. > So, I, for one, would prefer them to be stand alone > scripts. It is safer for rc, too, this way, since if they can be > called in a subshell we get some chance to trap errors. It's not a random decision whether a script is sourced or not: - it only happens for scripts that hve the extension .sh - scripts that have the extension .sh should only be run at initial boot (/etc/rcS.d) and SHOULD NOT be executed by normal users. That the script is not executable helps quite a bit for this. Most of the scripts do not even look at the start/stop argument. > > b) All scripts in /etc/init.d, /etc/rc.boot and similar directories > > have to be standalone shell scripts. They must have the 'x' flag > > turned on and contain a regular command to execute them in the > > first line (such as "#! /bin/sh"). They must not be called *.sh. But ONLY if they were designed to be run by a user / root, which isn't true for the *.sh scripts ... Mike. -- "Did I ever tell you about the illusion of free will?" -- Sheriff Lucas Buck, ultimate BOFH.