Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: startup runlevel script

by Bloodnok (Vicar)
on Sep 26, 2007 at 17:10 UTC ( #641194=note: print w/replies, xml ) Need Help??


in reply to startup runlevel script

Hi ,

Admittedly it's been a while since last I did battle with Suse ... however, if memory (and an awful lot of Solaris exposure since) is anything to go by, startup scripts are all written using sh(1) since that is guaranteed to be available at boot time - perl is typically installed on a partition that gets mounted quite late into the boot sequence and could quite concievably cause the machine to fail to boot properly (if at all).

HTH ,

Replies are listed 'Best First'.
Re^2: startup runlevel script
by dwm042 (Priest) on Sep 26, 2007 at 17:32 UTC
    Strictly speaking, shell scripts written as startup scripts, before /usr is mounted, need to be written with a statically compiled shell. This is because shared libraries are usually mounted on /usr and you really want the whole executable to be there before using it as an interpreter.

    Once run level 2 or more is reached, /usr is mounted and so it doesn't matter much which language you use in a startup script. And on servers where / and /usr are on the same file system, the interpreter of the script doesn't matter much, regardless of run level.

    Things I'd do is run a  who -rat the run level of interest to make sure you're actually at the run level you think you are at. Otherwise the precautions mentioned by regexes are well thought out and should be followed.

    Update: case where / and /usr are the same.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://641194]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2022-05-24 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?