1

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?

Jeff Atwood
  • 13,104
  • 20
  • 75
  • 92
Toren
  • 137
  • 3
  • 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

1 Answers1

2

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.

jlliagre
  • 8,861
  • 18
  • 36