Marieke Thayer wrote:
Marieke Thayer wrote:
Hi,
I have a TS-7200 board that boots into a Debian root file system on
Compact Flash. I do not have a real time clock, so I need to get the
time. After I boot into Debian 2.4.26 , I have to bring up the
network, before I can get the time using the following commands.
ifup eth0
ntpdate -u 131.187.13.100 #microsofts NTP server
I would like to do this automatically on boot. However, I am unsure
about where to put the commands. I know that inittab calls files to
execute for each run level. I know that /etc/init.d/rcS calls
/sbin/unconfigured.sh if it exists, which it doesn't, at the
beginning. I know that rcS also calls /sbin/setup.sh, which also
doesn't exist, at the end of the script. I am assuming that I want my
machine to get a date as early as possible so I should be putting it
in one of these files. Can somebody help me out here?
I think that I can get the date robustly by pinging the NTP server
and trying a different one if I don't get a result. That way my
system won't hang on startup. Admittedly, I only just figured my way
around my lack of connection and ntpdate enough to get this far, so I
am trying to get hints in advance. I would appreciate comments here,
too? Is ping the right query, or is there a better one?
If I cannot figure out how to adjust my date from UTP to PST, you
might be getting another email from me. However, hints as to where to
look would save me time.
Thanks all,
Marieke
OK. I found a reference to /etc/localtime, so I set it up to point to
the Los_ Angeles time zone file. I see the file for setting up ntp,
but it isn't going to do anything until I am connected to the net (ie
eth0 is up). Therefore, I now think that my first goal should be to
get eth0 started at boot time. I have an /etc/network/interfaces file
with the appropriate adresses. This file seems to be accessed when I
type "ifup eth0", but not in the boot process. Clues about what to try
to modify would help. Should I modify my Redboot script or something
else.
Cheers,
Marieke
I'm far from knowledgeable in such things, but I would think that
/etc/rc* would be a decent place to start. Perhaps "man init".
--
Ralph
--------------------
Commerce with all nations, alliance with none, should be our motto.
--Thomas Jefferson
--
KPLUG-Newbie@kernel-panic.org
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie