initscripts: Store RTC in /etc/timestamp before mounting root ro, fixing part of...
authorMatthias Hentges <oe@hentges.net>
Mon, 3 Jul 2006 03:24:05 +0000 (03:24 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Mon, 3 Jul 2006 03:24:05 +0000 (03:24 +0000)
packages/initscripts/initscripts-1.0/halt
packages/initscripts/initscripts-1.0/reboot
packages/initscripts/initscripts-1.0/save-rtc.sh [new file with mode: 0644]
packages/initscripts/initscripts_1.0.bb

index aa17696..d8cab22 100755 (executable)
@@ -7,12 +7,6 @@
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
-# Update the timestamp, if there is already one
-if test -e /etc/timestamp
-then
-        date +%2m%2d%2H%2M%Y > /etc/timestamp
-fi
-
 # See if we need to cut the power.
 if test -x /etc/init.d/ups-monitor
 then
index 7f95255..5627819 100755 (executable)
@@ -7,11 +7,5 @@
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
-# Update the timestamp, if there is one
-if test -e /etc/timestamp
-then
-        date +%2m%2d%2H%2M%Y > /etc/timestamp
-fi
-
 echo -n "Rebooting... "
 reboot -d -f -i
diff --git a/packages/initscripts/initscripts-1.0/save-rtc.sh b/packages/initscripts/initscripts-1.0/save-rtc.sh
new file mode 100644 (file)
index 0000000..d06aa6d
--- /dev/null
@@ -0,0 +1,16 @@
+#! /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
index eebfbca..0d14403 100644 (file)
@@ -6,7 +6,7 @@ DEPENDS = "makedevs"
 DEPENDS_openzaurus = "makedevs virtual/kernel"
 RDEPENDS = "makedevs"
 LICENSE = "GPL"
-PR = "r73"
+PR = "r74"
 
 SRC_URI = "file://halt \
            file://ramdisk \
@@ -31,7 +31,8 @@ SRC_URI = "file://halt \
            file://sysfs.sh \
            file://device_table.txt \
            file://populate-volatile.sh \
-           file://volatiles "
+           file://volatiles \
+          file://save-rtc.sh"
 
 SRC_URI_append_arm          = " file://alignment.sh"
 SRC_URI_append_openzaurus   = " file://checkversion"
@@ -82,6 +83,7 @@ do_install () {
        install -m 0755    ${WORKDIR}/devpts            ${D}${sysconfdir}/default
        install -m 0755    ${WORKDIR}/sysfs.sh          ${D}${sysconfdir}/init.d
        install -m 0755    ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d
+       install -m 0755    ${WORKDIR}/save-rtc.sh       ${D}${sysconfdir}/init.d        
        install -m 0644    ${WORKDIR}/volatiles         ${D}${sysconfdir}/default/volatiles/00_core
        if [ "${TARGET_ARCH}" = "arm" ]; then
                install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
@@ -119,6 +121,8 @@ do_install () {
        ln -sf          ../init.d/umountfs      ${D}${sysconfdir}/rc0.d/S40umountfs
        # udev will run at S55 if installed
        ln -sf          ../init.d/halt          ${D}${sysconfdir}/rc0.d/S90halt
+       ln -sf          ../init.d/save-rtc.sh   ${D}${sysconfdir}/rc0.d/S25save-rtc.sh
+       ln -sf          ../init.d/save-rtc.sh   ${D}${sysconfdir}/rc6.d/S25save-rtc.sh          
        ln -sf          ../init.d/banner        ${D}${sysconfdir}/rcS.d/S02banner
        ln -sf          ../init.d/checkroot.sh  ${D}${sysconfdir}/rcS.d/S10checkroot.sh
 #      ln -sf          ../init.d/checkfs.sh    ${D}${sysconfdir}/rcS.d/S30checkfs.sh