Hi,
Many thanks to Thomas Kolejaka,Jim Fitzmaurice,Bluejay Adametz,Jenny Butler.
Original Question:
I need to run an UPS script automatically when tru64 boots up. I
> know I need to modify the following script with an option of start
> and stop and I have to copy these files in /sbin/initd. I tried but
> it's not happening. I will be happy if gurus can help me to modify
> the following script and procedure for automatic startup. We are
> using Tru64 version 5.1a .
>
>
Answer:
After moving the script to the /sbin/init.d directory, you have to link
it to the /sbin/rc3.d directory.
# cd /sbin/rc3.d
# ln -s ../init.d/<scriptname> S99<scriptname>
I also found a script which can automate the above activity. Example of that script is as follows:
#!/sbin/sh
#
PATH=/sbin:/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb
export PATH
script=/sbin/init.d/powerflag
killscript=/sbin/rc0.d/K00powerflag
startscript=/sbin/rc3.d/S60powerflag
#
if [ ! -x $script ]; then
cp pf_boot.osf1 $script
chmod 744 $script
fi
#
if [ ! -x $startscript ]; then
ln $script $startscript
chmod 744 $startscript
fi
#
if [ ! -x $killscript ]; then
ln $script $killscript
chmod 744 $killscript
fi
Thanks & Regards
Naidu
OHI Telecommunications
P.O BOX 889, PC 113
MUSCAT
Received on Wed Sep 17 2003 - 08:06:32 NZST