diff mbox

SV: [PATCH 5/5] busybox: Add use flag for using utc in busybox-hwclock

Message ID BD22328D0EB182418C2A0952DC2454F8791B774E@VMPREVAS1.prevas.se
State Not Applicable
Headers show

Commit Message

kim.hansen@prevas.dk Dec. 16, 2014, 2:10 p.m. UTC
Hi Christian,

It seems to me this change would make it impossible to use local time hwclock ?

Also, according to: http://busybox.net/downloads/BusyBox.html

it should be -u or -l to switch the behaviour. 

/Kim
diff mbox

Patch

diff --git a/recipes/busybox/busybox-configure.inc b/recipes/busybox/busybox-configure.inc
index 9e545fb..92e616a 100644
--- a/recipes/busybox/busybox-configure.inc
+++ b/recipes/busybox/busybox-configure.inc
@@ -215,6 +215,17 @@  DEFAULT_USE_busybox_hwclock_sysvinit_stop  = "15"
 RECIPE_FLAGS += "busybox_hwclock_splashutils_progress busybox_hwclock_splashutils_msg"
 SPLASHUTILS_INITSCRIPTS:>USE_busybox_hwclock += " busybox_hwclock"
 DEFAULT_USE_busybox_hwclock_splashutils_msg = "\"Starting Busybox HWclock\""
+RECIPE_FLAGS += "busybox_hwclock_utc"
+DO_CONFIGURE_PREFUNCS += " do_configure_busybox_hwclock_use_utc"
+do_configure_busybox_hwclock_use_utc () {
+       if [ -n "$USE_busybox_hwclock" ]; then
+               if [ -z "$USE_busybox_hwclock_utc" ]; then
+                       sed -i -e 's/HWCLOCK_UTC//' ${SRCDIR}/busybox-hwclock
+               else
+                       sed -i -e 's/HWCLOCK_UTC/\-\-utc/' ${SRCDIR}/busybox-hwclock
+               fi
+       fi
+}

 RECIPE_FLAGS += "busybox_hwclock_crontab"
 # USE flag: synchronize to rtc every hour using crond