HP Visualize c3600 IRIX to HP-UX Migration Guide - Page 13
System Shutdown
View all HP Visualize c3600 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 13 highlights
System Startup and Shutdown K500inetd K660net Because each script in /sbin/init.d performs both the startup and shutdown functions, each will have two links pointing toward the script from /sbin/rc*.d, one for the start action and one for the stop action. Run Levels and /sbin/rc In previous HP-UX releases, /etc/rc (now /sbin/rc) was run only once. Now it may run several times during the execution of a system, sequencing the execution scripts when moving between run levels. However, only the subsystems configured for execution, through configuration variables in /etc/rc.config.d, are started or stopped when transitioning the run levels. /sbin/rc sequences the startup and shutdown scripts in the appropriate sequencer directories in lexicographical order. Upon transition from a lower to a higher run level, the start scripts for the new run level, and all intermediate levels between the old and new level, are executed. Upon transition from a higher to a lower run level, the kill scripts for the old run level, and all intermediate levels between the old and new level, are executed. When a system is booted to a particular run level, it will execute startup scripts for all run levels up to and including the specified level (except run level 0). For example, if booting to run level 4, /sbin/rc looks at the old run level (S) and the new run level (4) and executes all start scripts in states 1, 2, 3, and 4. Within each level, the start scripts are sorted lexicographically and executed in that order. Each level is sorted and executed separately to ensure that the lower level subsystems are started before the higher level subsystems. Consequently, when shutting down a system, the reverse takes place. The kill scripts are executed in lexicographical order starting at the highest run level and working down, so as to stop the subsystems in the reverse order in which they were started. As mentioned earlier, the numbering is reversed from the startup order. Example If you want cron to start when entering run level 2, you would modify the configuration variable script /etc/rc.config.d/cron to read as follows: # cron config # # CRON=1 to start CRON=1 This would be necessary because the execution script, /sbin/init.d/cron contains the following: # cron startup # . /etc/rc/config if [ $CRON = 1 ] then /usr/sbin/cron fi cron will start at run level 2, because in /sbin/rc2.d a link exists from S730cron to /sbin/init.d/cron. /sbin/rc will invoke /sbin/init.d/cron with a start argument, because the link name starts with an S. System Shutdown To shut down HP-UX for power-off, you can do either of the following: # init 0 or 8