summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-04-27 17:34:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-05 12:26:32 +0100
commit3a41c1eb3efd8e48738d0e28c738db4c3e925aa1 (patch)
tree2e37af4a4d0e9250c8622eecc6f9d503ad00e849
parente178de72184e3205cb57bedfbd160a6fd4912d00 (diff)
downloadpoky-3a41c1eb3efd8e48738d0e28c738db4c3e925aa1.tar.gz
initscripts: remove -i from halt/reboot arguments and allow override
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]. (From OE-Core rev: ace183894a5319cd73c94fd2653bbe52f29dca0b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/halt2
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/reboot2
-rw-r--r--meta/recipes-core/initscripts/initscripts_1.0.bb9
3 files changed, 10 insertions, 3 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/halt b/meta/recipes-core/initscripts/initscripts-1.0/halt
index 609b793b7c..021d9be127 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/halt
+++ b/meta/recipes-core/initscripts/initscripts-1.0/halt
@@ -24,6 +24,6 @@ then
24 hddown="" 24 hddown=""
25fi 25fi
26 26
27halt -d -f -i -p $hddown 27halt SED_HALTARGS -p $hddown
28 28
29: exit 0 29: exit 0
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/reboot b/meta/recipes-core/initscripts/initscripts-1.0/reboot
index 4c55885aba..cf32e95cb9 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/reboot
+++ b/meta/recipes-core/initscripts/initscripts-1.0/reboot
@@ -12,4 +12,4 @@
12PATH=/sbin:/bin:/usr/sbin:/usr/bin 12PATH=/sbin:/bin:/usr/sbin:/usr/bin
13 13
14echo -n "Rebooting... " 14echo -n "Rebooting... "
15reboot -d -f -i 15reboot SED_HALTARGS
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index d99092584e..720c252e70 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -6,7 +6,7 @@ DEPENDS = "makedevs"
6RDEPENDS_${PN} = "makedevs" 6RDEPENDS_${PN} = "makedevs"
7LICENSE = "GPLv2" 7LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" 8LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
9PR = "r124" 9PR = "r125"
10 10
11SRC_URI = "file://functions \ 11SRC_URI = "file://functions \
12 file://halt \ 12 file://halt \
@@ -38,6 +38,13 @@ SRC_URI_append_arm = " file://alignment.sh"
38 38
39KERNEL_VERSION = "" 39KERNEL_VERSION = ""
40 40
41HALTARGS ?= "-d -f"
42
43do_configure() {
44 sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/halt
45 sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/reboot
46}
47
41do_install () { 48do_install () {
42# 49#
43# Create directories and install device independent scripts 50# Create directories and install device independent scripts