Become superuser.
Add the script to the /etc/init.d directory.
# cp filename /etc/init.d # chmod 0744 /etc/init.d/filename # chown root:sys /etc/init.d/filename |
Create links to the appropriate rcn.d directory.
# cd /etc/init.d # ln filename /etc/rc2.d/Snnfilename # ln filename /etc/rcn.d/Knnfilename |
Verify that the script has links in the specified directories.
# ls /etc/init.d/ /etc/rc2.d/ /etc/rcn.d/ |
The following example shows how to add a run control script for the xyz service.
# cp xyz /etc/init.d # chmod 0744 /etc/init.d/xyz # chown root:sys /etc/init.d/xyz # cd /etc/init.d # ln xyz /etc/rc2.d/S100xyz # ln xyz /etc/rc0.d/K100xyz # ls /etc/init.d /etc/rc2.d /etc/rc0.d |