summaryrefslogtreecommitdiffstats
path: root/recipes/busybox
diff options
context:
space:
mode:
authorTom Rini <tom_rini@mentor.com>2010-08-20 13:12:18 -0700
committerTom Rini <tom_rini@mentor.com>2010-08-20 13:13:28 -0700
commit2f40e35f343526e19f319795a23ef6663047adf7 (patch)
tree7b10903abb7f71a78135b0fcb142c15c87b834c6 /recipes/busybox
parent57a1c3a667fd354a5bd8fd0c915919dbcac4289d (diff)
downloadopenembedded-2f40e35f343526e19f319795a23ef6663047adf7.tar.gz
busybox: Add and check /etc/default/hwclock for hwclock initscript
Signed-off-by: Tom Rini <tom_rini@mentor.com>
Diffstat (limited to 'recipes/busybox')
-rw-r--r--recipes/busybox/busybox.inc5
-rw-r--r--recipes/busybox/files/hwclock-default2
-rw-r--r--recipes/busybox/files/hwclock.sh2
3 files changed, 8 insertions, 1 deletions
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index a64c031c54..96d9bb1df4 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -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
index 0000000000..09ba56f655
--- /dev/null
+++ b/recipes/busybox/files/hwclock-default
@@ -0,0 +1,2 @@
+# Can we use hwclock on this system?
+HWCLOCKACCESS=yes
diff --git a/recipes/busybox/files/hwclock.sh b/recipes/busybox/files/hwclock.sh
index f9c9f9f2c2..71538fb9dc 100644
--- a/recipes/busybox/files/hwclock.sh
+++ b/recipes/busybox/files/hwclock.sh
@@ -14,6 +14,8 @@
. /etc/default/rcS
+. /etc/default/hwclock
+
[ "$UTC" = yes ] && UTC=-u || UTC=-l
case "$1" in