Where's the best place to put a command that needs to be run at boot time?
Howdy, All of you are going to say " /etc/rc.d/boot.local" but I'm wondering, is that really true? The reason is, I want to run ntpdate at bootup, but boot.local seems to happen very early on, before switiching to any runlevel. As I understand it, you have to be at runlevel 2 (or 3, I forget) before you have a network connection. So ntpdate wouldn't work before then. Or am I wrong? When does boot.local get run? ---------------------------------------------------- Jonathan Wilson System Administrator Cedar Creek Software http://www.cedarcreeksoftware.com Central Texas IT http://www.centraltexasit.com
Jonathan Wilson wrote:
Howdy,
All of you are going to say " /etc/rc.d/boot.local" but I'm wondering, is that really true?
Hi Johnathan, I don't know how it is in 7.1 but in 7.0 I just customize a copy of the 'skeleton' script in /sbin/init.d and put links to it in the right rc?.d subdirectory (i.e. in rc3.d for scripts I want to be run upon entering/leaving runlevel 3). HTH, Richard -- << And the knowledge that we fear... >> << is a weapon to be held against us. >> -- Neil Peart ---***---***---***---***---***---***---***---***---***---***---***--- Richard Witt Phone: (330) 672-0096 Dept. of Physics, Kent State University Email: witt@cnr2.kent.edu ---***---***---***---***---***---***---***---***---***---***---***---
Hi, Yes, boot.local is run before the runlevel scripts. What you want is to create a runlevel script. name it ntpdate for instance, and put it in /etc/rc.d. Then make a symlink /etc/rc.d/rcX.d/S##ntpdate, where X is the runlevel you're using, and ## is a number greater than that of network. This will make it run after the network is started. Another way is to use xntpd. It should already have a runlevel script, but otoh you'd have to configure it. HTH Anders On Monday 21 May 2001 22:43, Jonathan Wilson wrote:
Howdy,
All of you are going to say " /etc/rc.d/boot.local" but I'm wondering, is that really true?
The reason is, I want to run ntpdate at bootup, but boot.local seems to happen very early on, before switiching to any runlevel. As I understand it, you have to be at runlevel 2 (or 3, I forget) before you have a network connection. So ntpdate wouldn't work before then.
Or am I wrong? When does boot.local get run?
---------------------------------------------------- Jonathan Wilson System Administrator
Cedar Creek Software http://www.cedarcreeksoftware.com Central Texas IT http://www.centraltexasit.com
participants (3)
-
Anders Johansson
-
Richard Witt
-
wilson@claborn.net