Wednesday, June 17, 2009

Creating New Run Control Scripts

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:

Custom Search

Feeds from my other blog

Samsung S2 Brand new for 25900 White piece sealed box

For Sale, Mobile Phones - Accessories in India, Andhra Pradesh, Hyderabad. Date September 17

For Sale in Hyderabad