Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

During my activities on Solaris 10 machine I need twice reboot the Solaris unit and after reboot I'd like to run several scripts.

Before first reboot I store in /etc/rc3.d/S99myScript some bash script.The script runs OK after reboot

Before second reboot I store in the same place under same name /etc/rc3.d/S99myScript Perl script. After reboot the script does not run.

When I execute Perl script manually on my Solaris machine the script working OK.

What is going on here?

share|improve this question

migrated from May 22 '11 at 21:44

This question came from our site for professional and enthusiast programmers.

Why do you switch the scripts? What's wrong with one conditional rc.script running your 1st reboot script if (insert logic here: eg. last reboot done by your perl script or last reboot > 10 mins ago) and your pl script else? You could even use a another file containing the script to load next. Did I miss something? BTW, what does the log say? – mbx May 22 '11 at 21:58
up vote 2 down vote accepted

Solaris 10 and older rc scripts are strictly old bourne shell syntax. The sheband I suspect you added is ignored. If you need to run a perl script, just call it with perl myscript.perl from your rc script instead.

By the way, rc scripts are still supported but deprecated by SMF on Solaris 10 and newer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.