tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Summary:Automatic init.d Script
@ 2003-09-17  8:01 Naidu V. T.
  0 siblings, 0 replies; only message in thread
From: Naidu V. T. @ 2003-09-17  8:01 UTC (permalink / raw)


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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-17  8:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-17  8:01 Summary:Automatic init.d Script Naidu V. T.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox