busybox: Add and check /etc/default/hwclock for hwclock initscript
authorTom Rini <tom_rini@mentor.com>
Fri, 20 Aug 2010 20:12:18 +0000 (13:12 -0700)
committerTom Rini <tom_rini@mentor.com>
Fri, 20 Aug 2010 20:13:28 +0000 (13:13 -0700)
Signed-off-by: Tom Rini <tom_rini@mentor.com>
recipes/busybox/busybox.inc
recipes/busybox/files/hwclock-default [new file with mode: 0644]
recipes/busybox/files/hwclock.sh

index a64c031..96d9bb1 100644 (file)
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
 SECTION = "base"
 PRIORITY = "required"
 
-INC_PR = "r32"
+INC_PR = "r33"
 
 SRC_URI = "\
   file://busybox-cron \
@@ -20,6 +20,7 @@ SRC_URI = "\
   file://default.script file://simple.script \
   file://dhcp-hostname.patch \
   file://hwclock.sh \
+  file://hwclock-default \
   file://ifupdown-spurious-environ.patch \
   file://mount.busybox \
   file://syslog \
@@ -180,7 +181,9 @@ do_install () {
                install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
        fi
        if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then
+               install -d ${D}${sysconfdir}/default
                install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
+               install -m 0644 ${WORKDIR}/hwclock-default ${D}${sysconfdir}/default/hwclock
        fi
        if grep "CONFIG_APP_UDHCPC=y" ${WORKDIR}/defconfig; then
                install -d ${D}${sysconfdir}/udhcpc.d
diff --git a/recipes/busybox/files/hwclock-default b/recipes/busybox/files/hwclock-default
new file mode 100644 (file)
index 0000000..09ba56f
--- /dev/null
@@ -0,0 +1,2 @@
+# Can we use hwclock on this system?
+HWCLOCKACCESS=yes
index f9c9f9f..71538fb 100644 (file)
@@ -14,6 +14,8 @@
 
 . /etc/default/rcS
 
+. /etc/default/hwclock
+
 [ "$UTC" = yes ] && UTC=-u || UTC=-l
 
 case "$1" in