You can use the attached as a template for the script.

If you use the '# chkconfig:' line you can 
set the runlevel, start, and stop defaults.
The '--add' command line will then set it 
up that way from the start.

The script was found here:

http://www.vergenet.net/~conrad/scripts/pants.html

>>> list at slushpupie.com 03/12/03 03:06PM >>>
If you want it to run at boot, place the script in /etc/init.d If you want
to 
do it the "right" way, take a look at how other scripts are written in
that 
directory and match it. If you dont, its not a big deal, things should
work 
about the same way. Then, make sure you are logged in as root and run:
/sbin/chkconfig --add scriptname
/sbin/chkconfig --level 345 scriptname on
What that will do, make your script capable of management by chkconfig. 
The 
second line makes your script run for runlevels 3,4, and 5.
All reboot (and shutdown for that matter) does is call shutdown scripts
which 
send terminating signals to all running applications and then halts or
resets 
the CPU.  You really want to log out of everything first, then call
reboot.  
If you use Gnome and GDM, there is a reboot button which will log you out,

then reboot, likewise if you use KDE and KDM together.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pants
Type: application/octet-stream
Size: 1119 bytes
Desc: not available
Url : http://shadowknight.real-time.com/pipermail/tclug-list/attachments/20030312/ab269e7d/pants.obj