[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Are they ever going to fix the time 'bug'?
- Subject: Re: [cobalt-users] Are they ever going to fix the time 'bug'?
- From: Jeff Lovell <jlovell@xxxxxxxxxx>
- Date: Tue Aug 29 12:26:23 2000
- Organization: Cobalt Networks, Inc.
Martin Adams wrote:
>
> O.K., Granted I'm a newbie with this RaQ3i BUT I have better things to
> do than have a check list to remind me that everytime I need to bring
> the RaQ down to go into the control panel and fix the time. It really
> screws up the logs for the stats. Anyone know if Cobalt is going to fix
> this, minor, but very annoying problem?
Try this shell script...
--begin--
#!/bin/bash
# Fix the hardware clock settings....
ARC=0
UTC=0
if [ -f /etc/sysconfig/clock ]; then
. /etc/sysconfig/clock
# convert old style clock config to new values
if [ "${CLOCKMODE}" = "GMT" ]; then
UTC=true
elif [ "${CLOCKMODE}" = "ARC" ]; then
ARC=true
fi
fi
CLOCKDEF=""
if [ -x /sbin/hwclock ]; then
CLOCKFLAGS="--systohc"
CLOCK=/sbin/hwclock
else
CLOCKFLAGS="-a"
CLOCK=/sbin/clock
fi
case "$UTC" in
yes|true)
CLOCKFLAGS="$CLOCKFLAGS -u";
CLOCKDEF="$CLOCKDEF (utc)";
;;
esac
if [ "$CLOCK" = "/sbin/clock" ]; then
case "$ARC" in
yes|true)
CLOCKFLAGS="$CLOCKFLAGS -A";
CLOCKDEF="$CLOCKDEF (arc)";
;;
esac
fi
# Now that we are all knowing, do the dirty work.
$CLOCK $CLOCKFLAGS
if [ -e /etc/adjtime ]; then
rm /etc/adjtime
fi
$CLOCK $CLOCKFLAGS
--end--
--
Jeff Lovell
Cobalt Networks, Inc.