|
From: <d9...@ef...> - 2002-09-22 11:01:04
|
Hi!
I have wondered why my firewall never updates it's hw or sys clock
although it should. I found that the updatetime script in
/etc/multicron-d doesn't work.
updatetime () {
[ -f /etc/default/rcS ] && . /etc/default/rcS
[ "$GMT" = "-u" ] && GMT="--utc"
if [ -n "`ps axc | grep xntpd`" ]; then
hwclock --systohc $GMT
else
[ "$lrp_DATE_SERVER" != "" ] \
&& rdate -s $lrp_DATE_SERVER \
&& sleep 2 && hwclock --systohc $GMT
fi
}
This code will ALWAYS go into the first option of the if-statement.
The length of "`ps axc | grep xntpd`" will always be non-zero because
'grep xntpd' will be launched as a new process due to the pipe.
Since I'm not the sharpest mind concerning scripting, I humbly allow
anyone to make this script work correct. For my needs I can simply
remove the if-statement and run the rdate command, but..
/Anders
|