Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:


I put my script at runlevel 5 on Suse 10.i.e., i create a symlinkbeginning with a capital S that points to the actual script

But the script does not get executed at startup

also, i want to see the terminal where the script runs, should run in the foreground

Thanks for all the help

Replies are listed 'Best First'.
Re: startup runlevel script
by regexes (Hermit) on Sep 26, 2007 at 10:42 UTC

    You might want to check out the following useful information about PerlMonks: How do I post a question effectively?

    Back to your problem... we cannot be positive that your question has anything to do with perl. Is your "script" written in perl? What happens when you try to run the script from the command line? Do you receive errors? More information would be helpful to everyone.


    Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan "press on" has solved and always will solve the problems of the human race.
    -- Calvin Coolidge, 30th President of the USA.
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: startup runlevel script
by cengineer (Pilgrim) on Sep 26, 2007 at 14:22 UTC
Re: startup runlevel script
by Bloodnok (Vicar) on Sep 26, 2007 at 17:10 UTC
    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 ,

      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.