http://solarisinterview.blogspot.com/ Solaris Interview Questions and Answers
Creating New Run Control Scripts
Create the script in the /etc/init.d directory and create links in the appropriate /etc/rc#.d directory for the run level in which the service is to be started and stop.
# vi /etc/init.d/filename
# chmod 744 /etc/init.d/filename
# chgrp sys /etc/init.d/filename
# cd /etc/init.d
# ln filename /etc/rc#.d/S##filename
# ln filename /etc/rc#.d/K##filename
# /etc/init.d/filename start -- To test the filename
# init 2 -- Switch the run level to 2
# shutdown -- Will moves to maintenance mode
# shutdown –y –g300 –i6 “The system is being rebooted” -- Reboots after 300 seconds.
Default is 60 sec
# shutdown –i0 (or) i5 (or) –i6
# halt -- Shutdown the system immediately to ok prompt
# poweroff -- Equivalent to init5
# reboot -- Equivalent to init6 -- These 3
No comments:
Post a Comment