If you need to do these tasks more than once: Write each step as a separate script that tests for the presence of a file in a known location (that your distribution doesn't clear on reboot)(eg, if ![ -f /var/pid/step1] do your step and create /var/pid/step1 at the successful end of the step, then run /etc/init.d/step2 as the next step. In the top of the script, add the magic comments used by your distribution to make step2 dependent on step 1 and step3 dependent on step2, so they get executed in order. Step2 should create /var/pid/step2 and then reboot.
Insserv or chkconfig the steps into the right runlevels for your normal operations, then /etc/init.d/step1. you can chkconfig off or remove the scripts if you don't want them lying around for later. Longer term, you should look into implementing something like NQS that allows you to define batch jobs and batch job dependencies without this sort of ickyness. ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
