> Hello Alan, thanks for the reply, but I think your > reply is about "normal" shutdown scripts used to > terminate a service properly.
Up until now I wasn't aware of an "abnormal" way to bring a system down. The only other way that I know happens when init 0 or init 5 hang and you eventually get mad and yank the power cord. Which means that your script did nothing. :-) > Would this also work for scripts which change the > shutdown logic of the OS itself? I mean not shutting > down a specific service and ending my script > afterwards - I need to insert a sleeping watchdog > loop which makes sure that the system forcedly > reboots in certain circumstances (explained in my > original forum web-post and reiterated below) - and I > don't want this loop killed by "killall -9" lookalike > which used to be in /etc/rc0 and may now be in > svc.startd or elsewhere. This logic must keep running > until the OS uptime ends one way or another. I'm only aware of two facilities. smf which can disable the services one by one (svcadm enable/disable) or in the cases of init 5 etc... stop everything or the old method with scripts in /etc/rc?.d linked to /etc/init.d. > Back in Solaris 8/9/10, the /etc/rc0 script was THE > logic which led to system halt or reboot (sans the > reboot/halt/uadmin commands themselves). On the way > it called the shutdown scripts, issued killall for > the leftover processes, and unmounted the > filesystems, and reported 'The system is down.' And > in my case - after all that it spawned the watchdog > loop, immune to killall because there were no > killalls after that. I've never seen that. > In OpenSolaris and later /etc/rc0 only calls the > legacy shutdown scripts, while the later half of the > logic is gone elsewhere (and I'm trying to discover - > where). smf is the only other facility that I know of. I don't have a Solaris 10 box anymore so I have no clue what is in the rest of /etc/rc0.d. Can you post the complete script with ! at the beginning of the lines that contain your code and not Sun's code? You may want to dig into the code at src.opensolaris.org. This is probably the original script: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/initpkg/rc0.sh in which case it looks like you need to start parsing lsvcrun. http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/svc/lsvcrun/lsvcrun.c alan -- This message posted from opensolaris.org _______________________________________________ sysadmin-discuss mailing list sysadmin-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/sysadmin-discuss