From patchwork Wed May 7 10:44:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: christian.braunersorensen@prevas.dk X-Patchwork-Id: 346540 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [130.225.254.102]) by ozlabs.org (Postfix) with ESMTP id A65FE140271 for ; Wed, 7 May 2014 20:44:18 +1000 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id CF6AC3FFB1 for ; Wed, 7 May 2014 12:44:16 +0200 (CEST) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail02.prevas.se (mail02.prevas.se [62.95.78.10]) by hugin.dotsrc.org (Postfix) with ESMTPS id 5DA933FEC4 for ; Wed, 7 May 2014 12:44:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=2309; q=dns/txt; s=ironport2; t=1399459454; x=1430995454; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=+CI9l8l4tgUvew/uuH4M2aOnonh8dcbYfjB7NqVGukw=; b=Te5QvtQhoTKz4gqQLecCe/QNVJBCDL8gKKGJum0xS308kgE5QSa7cBTa EApKAE7zWNbCMmCwWWCJq+lPGu7hPyfSWrrItdYzlpSLwQW+DiO4wkNKJ ZG8liBS/zCuEWFhGacmHg2oe9Nz2WBNyuvkLgCpbuDBP7W1yE4LId6zxA w=; X-IronPort-AV: E=Sophos;i="4.97,1002,1389740400"; d="scan'208";a="568473" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 07 May 2014 12:44:14 +0200 Received: from localhost (172.16.10.102) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.347.0; Wed, 7 May 2014 12:44:13 +0200 Received: by localhost (Postfix, from userid 30007) id 0793C681EA7; Wed, 7 May 2014 10:44:14 +0000 (UTC) From: To: Subject: [PATCH 4/4] busybox: Add USE flag to set whether busybox hwclock uses utc Date: Wed, 7 May 2014 10:44:11 +0000 Message-ID: X-Mailer: git-send-email 1.8.4 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org From: Christian Sørensen USE_busybox_hwclock_use_utc: Default not set. If set, inserts --utc to all hwclock commands within the busybox-hwclock initscript. Signed-off-by: Christian Sørensen --- recipes/busybox/busybox-configure.inc | 11 +++++++++++ recipes/busybox/files/busybox-hwclock | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/recipes/busybox/busybox-configure.inc b/recipes/busybox/busybox-configure.inc index 06588d6..e359928 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 diff --git a/recipes/busybox/files/busybox-hwclock b/recipes/busybox/files/busybox-hwclock index 84619ff..d7446e6 100755 --- a/recipes/busybox/files/busybox-hwclock +++ b/recipes/busybox/files/busybox-hwclock @@ -35,9 +35,9 @@ case "$1" in then if [ -z "$TZ" ] then - hwclock --hctosys + hwclock HWCLOCK_UTC --hctosys else - TZ="$TZ" hwclock --hctosys + TZ="$TZ" hwclock HWCLOCK_UTC --hctosys fi fi @@ -60,7 +60,7 @@ case "$1" in fi if [ "$HWCLOCKACCESS" != no ] then - hwclock --systohc + hwclock HWCLOCK_UTC --systohc fi if [ "$VERBOSE" != no ] then @@ -71,7 +71,7 @@ case "$1" in show) if [ "$HWCLOCKACCESS" != no ] then - hwclock --show + hwclock HWCLOCK_UTC --show fi ;; *)