aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/halt
diff options
context:
space:
mode:
authorPetr Lautrbach <plautrba@redhat.com>2011-01-14 19:00:35 +0100
committerPetr Lautrbach <plautrba@redhat.com>2011-01-14 19:00:35 +0100
commitc7b97befd5f656c00a2054fc0ca2bd25205d18b9 (patch)
tree4f4abc153c3aa9679b2afaa41fde249226427cbe /rc.d/init.d/halt
parent1a2883e862cfa50d7553f4fc91b37a6d481f32f0 (diff)
downloadinitscripts-c7b97befd5f656c00a2054fc0ca2bd25205d18b9.tar
initscripts-c7b97befd5f656c00a2054fc0ca2bd25205d18b9.tar.gz
initscripts-c7b97befd5f656c00a2054fc0ca2bd25205d18b9.tar.bz2
initscripts-c7b97befd5f656c00a2054fc0ca2bd25205d18b9.tar.xz
initscripts-c7b97befd5f656c00a2054fc0ca2bd25205d18b9.zip
test if there is /dev/rtc before syncing hardware clock (#598850)
Diffstat (limited to 'rc.d/init.d/halt')
-rwxr-xr-xrc.d/init.d/halt2
1 files changed, 1 insertions, 1 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index d6270d7b..b07776ea 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -104,7 +104,7 @@ touch /var/lib/random-seed
chmod 600 /var/lib/random-seed
action $"Saving random seed: " dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=512 2>/dev/null
-[ -x /sbin/hwclock ] && action $"Syncing hardware clock to system time" /sbin/hwclock --systohc
+[ -x /sbin/hwclock -a -e /dev/rtc ] && action $"Syncing hardware clock to system time" /sbin/hwclock --systohc
# Try to unmount tmpfs filesystems to avoid swapping them in. Ignore failures.
tmpfs=$(awk '$2 ~ /^\/($|proc|dev)/ { next; }