From patchwork Tue Jul 30 07:16:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Kim_B=C3=B8ndergaard?= X-Patchwork-Id: 263191 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 [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id 67F082C00BE for ; Tue, 30 Jul 2013 17:16:23 +1000 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id F30523FD25 for ; Tue, 30 Jul 2013 09:16:20 +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 5D1D93FD25 for ; Tue, 30 Jul 2013 09:16:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=2831; q=dns/txt; s=ironport2; t=1375168579; x=1406704579; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=FwA6fJQ9DiWiG6rWEDSlnzu983HCfMGrWIvDYJyvd/I=; b=PSFQ0e1b7wNV+cnKsvle4gPl1OVKLURx8LnSrXQXM45JCy+XY2efWXuu hC59/2z558J7bHzASxFcUWIh4v2TA7j2IDGI0ppK7jn+AMO2Bj67PgRgB RdM1e03D6OTAeOSbINMn7cGklZjKUDaIKzjMjftjx4Lye7xFQYeabq8nK U=; X-IronPort-AV: E=Sophos;i="4.89,776,1367964000"; d="scan'208";a="3158428" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 30 Jul 2013 09:16:18 +0200 Received: from localhost (172.16.10.102) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.342.3; Tue, 30 Jul 2013 09:16:18 +0200 Received: by localhost (Postfix, from userid 30019) id 984A268164E; Tue, 30 Jul 2013 07:16:18 +0000 (UTC) From: =?UTF-8?q?Kim=20B=C3=B8ndergaard?= To: Subject: [PATCH 1/1] busybox, mdev: Added option for disabling mdev -s in sysv-init Date: Tue, 30 Jul 2013 07:16:16 +0000 Message-ID: <8dd38da41410280a7ed6ff98fadef773d1cd4db2.1375168363.git.kibo@prevas.dk> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 Cc: =?UTF-8?q?Kim=20B=C3=B8ndergaard?= 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 --- recipes/busybox/busybox-configure.inc | 2 ++ recipes/busybox/busybox-install.inc | 26 ++++++++++++++++++++++++++ recipes/busybox/files/busybox-mdev | 4 ++++ 3 files changed, 32 insertions(+) diff --git a/recipes/busybox/busybox-configure.inc b/recipes/busybox/busybox-configure.inc index 6caaf3e..0cfb779 100644 --- a/recipes/busybox/busybox-configure.inc +++ b/recipes/busybox/busybox-configure.inc @@ -118,6 +118,8 @@ DEFAULT_USE_busybox_mdev_sysvinit_start = "10" RECIPE_FLAGS += "busybox_mdev_splashutils_progress busybox_mdev_splashutils_msg" SPLASHUTILS_INITSCRIPTS:>USE_busybox_mdev += " busybox_mdev" DEFAULT_USE_busybox_mdev_splashutils_msg = "\"Starting Mdev\"" +RECIPE_FLAGS += "busybox_mdev_dash_s" +DEFAULT_USE_busybox_mdev_dash_s = "1" RECIPE_FLAGS += "busybox_klogd \ busybox_klogd_sysvinit_start busybox_klogd_conlevel" diff --git a/recipes/busybox/busybox-install.inc b/recipes/busybox/busybox-install.inc index bfb0c11..de264b5 100644 --- a/recipes/busybox/busybox-install.inc +++ b/recipes/busybox/busybox-install.inc @@ -135,3 +135,29 @@ do_install () { sysvinit_install_script ${SRCDIR}/busybox-httpd fi } + +do_install[postfuncs] += "${BUSYBOX_INSTALL_POSTFUNCS}" +BUSYBOX_INSTALL_POSTFUNCS = "" +BUSYBOX_INSTALL_POSTFUNCS:>USE_busybox_mdev = " do_install_fix_mdev" + +python do_install_fix_mdev () { + import os, fileinput + path = d.get("D") + os.chdir(path) + sysconfdir=d.get("sysconfdir") + parse_state = "do_nothing" + for line in fileinput.FileInput("." + sysconfdir + "/init.d/busybox-mdev", inplace=1): + if d.get("USE_busybox_mdev_dash_s"): + line=line.replace("#mdev_dash_s SECTION_START", "") + line=line.replace("#mdev_dash_s SECTION_END", "") + else: + if parse_state == "do_nothing": + if line.find("#mdev_dash_s SECTION_START") == 0: + parse_state = "delete_line" + line = "" + else: + if line.find("#mdev_dash_s SECTION_END") == 0: + parse_state = "do_nothing" + line = "" + print line, +} diff --git a/recipes/busybox/files/busybox-mdev b/recipes/busybox/files/busybox-mdev index c068b94..64ebfb6 100755 --- a/recipes/busybox/files/busybox-mdev +++ b/recipes/busybox/files/busybox-mdev @@ -34,16 +34,20 @@ if mountpoint -q /dev/shm/; then umount -l /dev/shm/ fi +#mdev_dash_s SECTION_START # Create tmpfs for /dev echo "Creating tmpfs at /dev" mount -t tmpfs tmpfs /dev -o size=64k,mode=0755 +#mdev_dash_s SECTION_END # Register mdev as hotplug event helper echo "$MDEV" > /proc/sys/kernel/hotplug +#mdev_dash_s SECTION_START # Populate /dev from /sys info echo "Populating /dev using mdev" $MDEV -s +#mdev_dash_s SECTION_END # Touch .udev to inform scripts that /dev needs no further setup touch /dev/.udev