]> code.ossystems Code Review - openembedded-core.git/commitdiff
initscripts: remove -i from halt/reboot arguments and allow override
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 27 Apr 2011 16:34:17 +0000 (17:34 +0100)
committerSaul Wold <sgw@linux.intel.com>
Thu, 5 May 2011 05:12:27 +0000 (22:12 -0700)
Introduces a variable HALTARGS which specifies the arguments sent to
halt and reboot, and sets the default value to "-d -f", dropping the
previous -i (shut down all network interfaces before halt/reboot, which
causes a freeze with NFS root.)

Fixes [YOCTO #997].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
meta/recipes-core/initscripts/initscripts-1.0/halt
meta/recipes-core/initscripts/initscripts-1.0/reboot
meta/recipes-core/initscripts/initscripts_1.0.bb

index 609b793b7c135c63890b3e3c608c2776235768be..021d9be12718bfc4cfebc750c95fad54452df611 100755 (executable)
@@ -24,6 +24,6 @@ then
        hddown=""
 fi
 
-halt -d -f -i -p $hddown
+halt SED_HALTARGS -p $hddown
 
 : exit 0
index 4c55885abafcfb29aaf42d54dd10cc897aac3d69..cf32e95cb96777c5c1bb18bacb8e5c28e50b283a 100755 (executable)
@@ -12,4 +12,4 @@
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
 echo -n "Rebooting... "
-reboot -d -f -i
+reboot SED_HALTARGS
index d99092584e852abe511f5ec9386353e449e4bd3b..720c252e70f204d81fd42dd0ba784ea2bbde35e7 100644 (file)
@@ -6,7 +6,7 @@ DEPENDS = "makedevs"
 RDEPENDS_${PN} = "makedevs"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r124"
+PR = "r125"
 
 SRC_URI = "file://functions \
            file://halt \
@@ -38,6 +38,13 @@ SRC_URI_append_arm = " file://alignment.sh"
 
 KERNEL_VERSION = ""
 
+HALTARGS ?= "-d -f"
+
+do_configure() {
+       sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/halt
+       sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/reboot
+}
+
 do_install () {
 #
 # Create directories and install device independent scripts