From c7b97befd5f656c00a2054fc0ca2bd25205d18b9 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Fri, 14 Jan 2011 19:00:35 +0100 Subject: test if there is /dev/rtc before syncing hardware clock (#598850) --- rc.d/init.d/halt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.1