aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--initscripts.spec4
-rwxr-xr-xrc.d/rc.sysinit11
2 files changed, 13 insertions, 2 deletions
diff --git a/initscripts.spec b/initscripts.spec
index 16dd4f72..280c1d1c 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -17,6 +17,10 @@ that activate and deactivate most network interfaces.
%changelog
+* Sat Oct 11 1997 Erik Troan <ewt@redhat.com>
+
+- fixed rc.sysinit for hwclock compatibility
+
* Thu Oct 09 1997 Erik Troan <ewt@redhat.com>
- run 'ulimit -c 0' before running scripts in daemon function
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index e4002c4b..90dd043c 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -165,7 +165,14 @@ if [ -f /etc/sysconfig/clock ]; then
fi
fi
-CLOCKFLAGS="-a"
+if [ -x /sbin/hwclock ]; then
+ CLOCKFLAGS="--hctosys"
+ CLOCK=/sbin/hwclock
+else
+ CLOCKFLAGS="-a"
+ CLOCK=/sbin/clock
+fi
+
if [ $UTC = "true" ]; then
CLOCKFLAGS="$CLOCKFLAGS -u";
echo -n " (utc)"
@@ -175,7 +182,7 @@ if [ $ARC = "true" ]; then
echo -n " (arc)"
fi
echo -n ": "
-clock $CLOCKFLAGS
+$CLOCK $CLOCKFLAGS
date