* [PATCH 0/1] initscripts: remove -i from halt/reboot arguments and allow override
@ 2011-04-27 16:49 Paul Eggleton
2011-04-27 16:49 ` [PATCH 1/1] " Paul Eggleton
0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2011-04-27 16:49 UTC (permalink / raw)
To: openembedded-core, poky
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Removes -i from halt/reboot arguments to fix shutdown/reboot with NFS root,
and allows halt/reboot arguments to be overridden using a new HALTARGS
variable. Refer to bug [1] and discussion [2].
[1] http://bugzilla.pokylinux.org/show_bug.cgi?id=997
[2] https://lists.yoctoproject.org/pipermail/poky/2011-April/005395.html
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: paule/haltargs
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=paule/haltargs
Thanks,
Paul Eggleton <paul.eggleton@linux.intel.com>
---
Paul Eggleton (1):
initscripts: remove -i from halt/reboot arguments and allow override
meta/recipes-core/initscripts/initscripts-1.0/halt | 2 +-
.../initscripts/initscripts-1.0/reboot | 2 +-
meta/recipes-core/initscripts/initscripts_1.0.bb | 9 ++++++++-
3 files changed, 10 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/1] initscripts: remove -i from halt/reboot arguments and allow override
2011-04-27 16:49 [PATCH 0/1] initscripts: remove -i from halt/reboot arguments and allow override Paul Eggleton
@ 2011-04-27 16:49 ` Paul Eggleton
2011-04-27 17:56 ` [poky] " Darren Hart
0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2011-04-27 16:49 UTC (permalink / raw)
To: openembedded-core, poky
From: Paul Eggleton <paul.eggleton@linux.intel.com>
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 | 2 +-
.../initscripts/initscripts-1.0/reboot | 2 +-
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 609b793..021d9be 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/halt
+++ b/meta/recipes-core/initscripts/initscripts-1.0/halt
@@ -24,6 +24,6 @@ then
hddown=""
fi
-halt -d -f -i -p $hddown
+halt SED_HALTARGS -p $hddown
: exit 0
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/reboot b/meta/recipes-core/initscripts/initscripts-1.0/reboot
index 4c55885..cf32e95 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/reboot
+++ b/meta/recipes-core/initscripts/initscripts-1.0/reboot
@@ -12,4 +12,4 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
echo -n "Rebooting... "
-reboot -d -f -i
+reboot SED_HALTARGS
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index d990925..720c252 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"
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
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [poky] [PATCH 1/1] initscripts: remove -i from halt/reboot arguments and allow override
2011-04-27 16:49 ` [PATCH 1/1] " Paul Eggleton
@ 2011-04-27 17:56 ` Darren Hart
2011-04-28 10:13 ` Paul Eggleton
0 siblings, 1 reply; 6+ messages in thread
From: Darren Hart @ 2011-04-27 17:56 UTC (permalink / raw)
To: Paul Eggleton; +Cc: poky, openembedded-core
On 04/27/2011 09:49 AM, Paul Eggleton wrote:
> From: Paul Eggleton <paul.eggleton@linux.intel.com>
>
> 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].
Is the SED_* tag a common search/replace mechanism in OE recipes? It's
fine, I'm just wondering if there is an accepted best practice for this
sort of thing. I know we do some sed replacements of /usr/bin and /etc.
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
> ---
> meta/recipes-core/initscripts/initscripts-1.0/halt | 2 +-
> .../initscripts/initscripts-1.0/reboot | 2 +-
> 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 609b793..021d9be 100755
> --- a/meta/recipes-core/initscripts/initscripts-1.0/halt
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/halt
> @@ -24,6 +24,6 @@ then
> hddown=""
> fi
>
> -halt -d -f -i -p $hddown
> +halt SED_HALTARGS -p $hddown
>
> : exit 0
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/reboot b/meta/recipes-core/initscripts/initscripts-1.0/reboot
> index 4c55885..cf32e95 100755
> --- a/meta/recipes-core/initscripts/initscripts-1.0/reboot
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/reboot
> @@ -12,4 +12,4 @@
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
>
> echo -n "Rebooting... "
> -reboot -d -f -i
> +reboot SED_HALTARGS
> diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
> index d990925..720c252 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"
> 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
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [poky] [PATCH 1/1] initscripts: remove -i from halt/reboot arguments and allow override
2011-04-27 17:56 ` [poky] " Darren Hart
@ 2011-04-28 10:13 ` Paul Eggleton
2011-04-28 11:03 ` Koen Kooi
2011-04-28 18:57 ` Darren Hart
0 siblings, 2 replies; 6+ messages in thread
From: Paul Eggleton @ 2011-04-28 10:13 UTC (permalink / raw)
To: Darren Hart; +Cc: poky, openembedded-core
On Wednesday 27 April 2011 18:56:09 Darren Hart wrote:
> Is the SED_* tag a common search/replace mechanism in OE recipes? It's
> fine, I'm just wondering if there is an accepted best practice for this
> sort of thing. I know we do some sed replacements of /usr/bin and /etc.
Is there a more appropriate mechanism for substituting values of variables
into files (genuinely asking)? If this is the best mechanism it's possible we
might want to have a standard naming scheme though, I just made this one up on
the spot - I see in some other places we've used FIXMExxxx, so at least it's
not the worst :)
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [poky] [PATCH 1/1] initscripts: remove -i from halt/reboot arguments and allow override
2011-04-28 10:13 ` Paul Eggleton
@ 2011-04-28 11:03 ` Koen Kooi
2011-04-28 18:57 ` Darren Hart
1 sibling, 0 replies; 6+ messages in thread
From: Koen Kooi @ 2011-04-28 11:03 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: poky
Op 28 apr 2011, om 12:13 heeft Paul Eggleton het volgende geschreven:
> On Wednesday 27 April 2011 18:56:09 Darren Hart wrote:
>> Is the SED_* tag a common search/replace mechanism in OE recipes? It's
>> fine, I'm just wondering if there is an accepted best practice for this
>> sort of thing. I know we do some sed replacements of /usr/bin and /etc.
>
> Is there a more appropriate mechanism for substituting values of variables
> into files (genuinely asking)?
It's the one I use :)
regards,
Koen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [poky] [PATCH 1/1] initscripts: remove -i from halt/reboot arguments and allow override
2011-04-28 10:13 ` Paul Eggleton
2011-04-28 11:03 ` Koen Kooi
@ 2011-04-28 18:57 ` Darren Hart
1 sibling, 0 replies; 6+ messages in thread
From: Darren Hart @ 2011-04-28 18:57 UTC (permalink / raw)
To: Paul Eggleton; +Cc: poky, openembedded-core
On 04/28/2011 03:13 AM, Paul Eggleton wrote:
> On Wednesday 27 April 2011 18:56:09 Darren Hart wrote:
>> Is the SED_* tag a common search/replace mechanism in OE recipes? It's
>> fine, I'm just wondering if there is an accepted best practice for this
>> sort of thing. I know we do some sed replacements of /usr/bin and /etc.
>
> Is there a more appropriate mechanism for substituting values of variables
> into files (genuinely asking)? If this is the best mechanism it's possible we
> might want to have a standard naming scheme though, I just made this one up on
> the spot - I see in some other places we've used FIXMExxxx, so at least it's
> not the worst :)
There is an effort to document how to do initscripts, so including
something along these lines would be appropriate there. I have no
objection to SED_.... FIXMExxx that's a different story ;-)
>
> Cheers,
> Paul
>
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-04-28 18:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 16:49 [PATCH 0/1] initscripts: remove -i from halt/reboot arguments and allow override Paul Eggleton
2011-04-27 16:49 ` [PATCH 1/1] " Paul Eggleton
2011-04-27 17:56 ` [poky] " Darren Hart
2011-04-28 10:13 ` Paul Eggleton
2011-04-28 11:03 ` Koen Kooi
2011-04-28 18:57 ` Darren Hart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox