How to create user start-up scripts
I want my Suse 8.1 system to execute a simple user defined shell script after runlevel 5 has been reached. This script will hdparm -y one of my drives and set the time using ntp npt.servername. I know that you can use boot.local in the /etc/init.d directory. However at boot time there is no network yet so ntp doesn't work. I also read about the skeleton sample script but as I understand it, it is only useful for starting daemons and not for single commands. My question: where do I put a user start-script that will be executed automatically after runlevel 5 has been reached. Thanks. Jeroen from Amsterdam ~~~~~~~~~~~~~~~~~~~~ check www.21exposed.net
On Thursday 20 February 2003 20:51, Jeroen Leijen wrote:
I also read about the skeleton sample script but as I understand it, it is only useful for starting daemons and not for single commands.
There is no fundamental difference between starting a daemon and running a command. Use the skeleton script to create your own runlevel script. That would be the "right" way to do it. If you want to make sure it runs as the last thing in the sequence, check which script is currently running last and set your script to depend on that. Anders
* Jeroen Leijen (depot@xs4all.nl) [030220 11:48]:
This script will hdparm -y one of my drives and set the time using ntp npt.servername.
You already have scripts for this, xntpd and boot.idedma, both configurable from /etc/sysconfig. -- -ckm
participants (3)
-
Anders Johansson
-
Christopher Mahmood
-
Jeroen Leijen