diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-04-27 17:34:17 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-05 12:26:32 +0100 |
commit | 3a41c1eb3efd8e48738d0e28c738db4c3e925aa1 (patch) | |
tree | 2e37af4a4d0e9250c8622eecc6f9d503ad00e849 | |
parent | e178de72184e3205cb57bedfbd160a6fd4912d00 (diff) | |
download | poky-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-x | meta/recipes-core/initscripts/initscripts-1.0/halt | 2 | ||||
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/reboot | 2 | ||||
-rw-r--r-- | meta/recipes-core/initscripts/initscripts_1.0.bb | 9 |
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="" |
25 | fi | 25 | fi |
26 | 26 | ||
27 | halt -d -f -i -p $hddown | 27 | halt 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 @@ | |||
12 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | 12 | PATH=/sbin:/bin:/usr/sbin:/usr/bin |
13 | 13 | ||
14 | echo -n "Rebooting... " | 14 | echo -n "Rebooting... " |
15 | reboot -d -f -i | 15 | reboot 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" | |||
6 | RDEPENDS_${PN} = "makedevs" | 6 | RDEPENDS_${PN} = "makedevs" |
7 | LICENSE = "GPLv2" | 7 | LICENSE = "GPLv2" |
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
9 | PR = "r124" | 9 | PR = "r125" |
10 | 10 | ||
11 | SRC_URI = "file://functions \ | 11 | SRC_URI = "file://functions \ |
12 | file://halt \ | 12 | file://halt \ |
@@ -38,6 +38,13 @@ SRC_URI_append_arm = " file://alignment.sh" | |||
38 | 38 | ||
39 | KERNEL_VERSION = "" | 39 | KERNEL_VERSION = "" |
40 | 40 | ||
41 | HALTARGS ?= "-d -f" | ||
42 | |||
43 | do_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 | |||
41 | do_install () { | 48 | do_install () { |
42 | # | 49 | # |
43 | # Create directories and install device independent scripts | 50 | # Create directories and install device independent scripts |