aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-12-12 08:23:41 +0000
committerBill Nottingham <notting@redhat.com>2000-12-12 08:23:41 +0000
commitda42ebb7ed7dc23ed9b0da6a5ba879b968a7c59a (patch)
tree0f7e0d69b61eec9223c245ae3bdc0500f42afa51
parent2859d05034ad1445a989c47883888a8d0a3fb7cc (diff)
downloadinitscripts-da42ebb7ed7dc23ed9b0da6a5ba879b968a7c59a.tar
initscripts-da42ebb7ed7dc23ed9b0da6a5ba879b968a7c59a.tar.gz
initscripts-da42ebb7ed7dc23ed9b0da6a5ba879b968a7c59a.tar.bz2
initscripts-da42ebb7ed7dc23ed9b0da6a5ba879b968a7c59a.tar.xz
initscripts-da42ebb7ed7dc23ed9b0da6a5ba879b968a7c59a.zip
sync hardware clock to system time on halt (#21187)
-rwxr-xr-xrc.d/init.d/halt3
1 files changed, 3 insertions, 0 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 8177134c..362a4c5f 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -56,6 +56,9 @@ if [ $? = 0 -a -x /bin/aumix-minimal ]; then
runcmd "Saving mixer settings" /bin/aumix-minimal -f /etc/.aumixrc -S
fi
+# Sync clock
+runcmd "Syncing hardware clock to system time" /sbin/hwclock --systohc
+
# Turn off swap, then unmount file systems.
SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps`
[ -n "$SWAPS" ] && runcmd "Turning off swap: " swapoff $SWAPS