summaryrefslogtreecommitdiff
path: root/packages/initscripts/initscripts-1.0
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2007-08-14 18:13:17 +0000
committerMichael Lauer <mickey@vanille-media.de>2007-08-14 18:13:17 +0000
commitb83af04c15fa7e91faa3ecd2297937077c14a620 (patch)
tree3e3d3178014530d0ae339f4240c61034eceabaca /packages/initscripts/initscripts-1.0
parentc7c81cd5132693b4541572ae5080b1912560c9a0 (diff)
initscripts: first steps towards working together with RTC
TODO: might need more work for systems without a hardware clock
Diffstat (limited to 'packages/initscripts/initscripts-1.0')
-rwxr-xr-xpackages/initscripts/initscripts-1.0/bootmisc.sh7
-rw-r--r--packages/initscripts/initscripts-1.0/save-rtc.sh17
2 files changed, 8 insertions, 16 deletions
diff --git a/packages/initscripts/initscripts-1.0/bootmisc.sh b/packages/initscripts/initscripts-1.0/bootmisc.sh
index 814dba676c..1c817fab5e 100755
--- a/packages/initscripts/initscripts-1.0/bootmisc.sh
+++ b/packages/initscripts/initscripts-1.0/bootmisc.sh
@@ -62,10 +62,15 @@ fi
/sbin/ldconfig
#
-# Recover the time, if there is a time file
+# Recover the time, if there is a time file (first boot only)
+# If not, set system clock from hardware clock
#
if test -e /etc/timestamp
then
date -s `cat /etc/timestamp`
+ mv -f /etc/timestamp /etc/timestamp.done
+ /etc/init.d/hwclock.sh start
+else
+ /etc/init.d/hwclock.sh stop
fi
: exit 0
diff --git a/packages/initscripts/initscripts-1.0/save-rtc.sh b/packages/initscripts/initscripts-1.0/save-rtc.sh
index d06aa6d569..de7c2b7646 100644
--- a/packages/initscripts/initscripts-1.0/save-rtc.sh
+++ b/packages/initscripts/initscripts-1.0/save-rtc.sh
@@ -1,16 +1,3 @@
#! /bin/sh
-#
-# Copyright Matthias Hentges <devel@hentges.net> (c) 2006
-# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
-#
-# Filename: save-rtc.sh
-# Date: 03-Jul-06
-
-
-# Update the timestamp, if there is already one
-if test -e /etc/timestamp
-then
- echo "Will restore RCT from /etc/timestamp on next boot"
- echo "Delete that file to disable this feature."
- date +%2m%2d%2H%2M%Y > /etc/timestamp
-fi
+#FIXME readd timestamp handling for systems where RTC doesn't survive a reboot
+/etc/init.d/hwclock stop