* [Buildroot] [pull request] Pull request for branch for-2012.02/shutdown
@ 2012-01-11 17:09 Maxime Ripard
2012-01-11 17:09 ` [Buildroot] [PATCH 1/2] Rework of shutdown policy in inittab Maxime Ripard
2012-01-11 17:09 ` [Buildroot] [PATCH 2/2] Update the CHANGES file to mention this new policy Maxime Ripard
0 siblings, 2 replies; 5+ messages in thread
From: Maxime Ripard @ 2012-01-11 17:09 UTC (permalink / raw)
To: buildroot
Hi list,
This is an update of the previous patch rework the shutdown policy by calling
the stop function of init scripts.
I also added a mention of such a behaviour in the changes file so that users
can notice it.
Maxime
The following changes since commit 68902f743729b3482bb6bc2ae9d0306aa9c00f65:
ti-utils: unbreak build after libnl version bump (2011-12-26 19:33:43 +0100)
are available in the git repository at:
http://free-electrons.com/~maxime/git/buildroot.git for-2012.02/shutdown
Maxime Ripard (2):
Rework of shutdown policy in inittab
Update the CHANGES file to mention this new policy
CHANGES | 3 +++
fs/skeleton/etc/init.d/rcK | 27 +++++++++++++++++++++++++++
fs/skeleton/etc/inittab | 3 +--
3 files changed, 31 insertions(+), 2 deletions(-)
create mode 100755 fs/skeleton/etc/init.d/rcK
Thanks,
--
Maxime Ripard
^ permalink raw reply [flat|nested] 5+ messages in thread* [Buildroot] [PATCH 1/2] Rework of shutdown policy in inittab 2012-01-11 17:09 [Buildroot] [pull request] Pull request for branch for-2012.02/shutdown Maxime Ripard @ 2012-01-11 17:09 ` Maxime Ripard 2012-01-11 17:36 ` Peter Korsgaard 2012-01-11 17:09 ` [Buildroot] [PATCH 2/2] Update the CHANGES file to mention this new policy Maxime Ripard 1 sibling, 1 reply; 5+ messages in thread From: Maxime Ripard @ 2012-01-11 17:09 UTC (permalink / raw) To: buildroot This commit follows commit ad501b66. Start up of the busybox logging daemons were moved to an init script but the shutdown were still performed in inittab. This commit moves the shutdown policy to an rcK script that calls the stop function of all the init scripts in a reversed order. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> --- fs/skeleton/etc/init.d/rcK | 27 +++++++++++++++++++++++++++ fs/skeleton/etc/inittab | 3 +-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100755 fs/skeleton/etc/init.d/rcK diff --git a/fs/skeleton/etc/init.d/rcK b/fs/skeleton/etc/init.d/rcK new file mode 100755 index 0000000..59e9c54 --- /dev/null +++ b/fs/skeleton/etc/init.d/rcK @@ -0,0 +1,27 @@ +#!/bin/sh + + +# Stop all init scripts in /etc/init.d +# executing them in reversed numerical order. +# +for i in $(ls -r /etc/init.d/S??*) ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set stop + . $i + ) + ;; + *) + # No sh extension, so fork subprocess. + $i stop + ;; + esac +done + diff --git a/fs/skeleton/etc/inittab b/fs/skeleton/etc/inittab index ac410d6..85881f4 100644 --- a/fs/skeleton/etc/inittab +++ b/fs/skeleton/etc/inittab @@ -30,8 +30,7 @@ null::sysinit:/bin/hostname -F /etc/hostname ::ctrlaltdel:/sbin/reboot # Stuff to do before rebooting -null::shutdown:/usr/bin/killall klogd -null::shutdown:/usr/bin/killall syslogd +null::shutdown:/etc/init.d/rcK null::shutdown:/bin/umount -a -r null::shutdown:/sbin/swapoff -a -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] Rework of shutdown policy in inittab 2012-01-11 17:09 ` [Buildroot] [PATCH 1/2] Rework of shutdown policy in inittab Maxime Ripard @ 2012-01-11 17:36 ` Peter Korsgaard 0 siblings, 0 replies; 5+ messages in thread From: Peter Korsgaard @ 2012-01-11 17:36 UTC (permalink / raw) To: buildroot >>>>> "Maxime" == Maxime Ripard <maxime.ripard@free-electrons.com> writes: Maxime> This commit follows commit ad501b66. Start up of the busybox logging Maxime> daemons were moved to an init script but the shutdown were still Maxime> performed in inittab. This commit moves the shutdown policy to an Maxime> rcK script that calls the stop function of all the init scripts in Maxime> a reversed order. Committed, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] Update the CHANGES file to mention this new policy 2012-01-11 17:09 [Buildroot] [pull request] Pull request for branch for-2012.02/shutdown Maxime Ripard 2012-01-11 17:09 ` [Buildroot] [PATCH 1/2] Rework of shutdown policy in inittab Maxime Ripard @ 2012-01-11 17:09 ` Maxime Ripard 2012-01-11 17:37 ` Peter Korsgaard 1 sibling, 1 reply; 5+ messages in thread From: Maxime Ripard @ 2012-01-11 17:09 UTC (permalink / raw) To: buildroot Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> --- CHANGES | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/CHANGES b/CHANGES index 515e3db..5c1e9c9 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,9 @@ uClibc: remove 0.9.30, backport unshare() support. + Buildroot now calls the stop function of scripts in /etc/init.d at + shutdown. + Updated/fixed packages: barebox, bash, binutils, bison, coreutils, dbus-glib, diffutils, dropbear, ebtables, ffmpeg, flex, fluxbox, gawk, grep, gst-dsp, gst-ffmpeg, htop, -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] Update the CHANGES file to mention this new policy 2012-01-11 17:09 ` [Buildroot] [PATCH 2/2] Update the CHANGES file to mention this new policy Maxime Ripard @ 2012-01-11 17:37 ` Peter Korsgaard 0 siblings, 0 replies; 5+ messages in thread From: Peter Korsgaard @ 2012-01-11 17:37 UTC (permalink / raw) To: buildroot >>>>> "Maxime" == Maxime Ripard <maxime.ripard@free-electrons.com> writes: Maxime> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Maxime> --- Maxime> CHANGES | 3 +++ Maxime> 1 files changed, 3 insertions(+), 0 deletions(-) Maxime> diff --git a/CHANGES b/CHANGES Maxime> index 515e3db..5c1e9c9 100644 Maxime> --- a/CHANGES Maxime> +++ b/CHANGES Maxime> @@ -10,6 +10,9 @@ Maxime> uClibc: remove 0.9.30, backport unshare() support. Maxime> + Buildroot now calls the stop function of scripts in /etc/init.d at Maxime> + shutdown. Thanks. In general I prefer to maintain CHANGES myself, as we otherwise easily get merge conflicts (like now), but I've fixed up the conflict and committed. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-11 17:37 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-01-11 17:09 [Buildroot] [pull request] Pull request for branch for-2012.02/shutdown Maxime Ripard 2012-01-11 17:09 ` [Buildroot] [PATCH 1/2] Rework of shutdown policy in inittab Maxime Ripard 2012-01-11 17:36 ` Peter Korsgaard 2012-01-11 17:09 ` [Buildroot] [PATCH 2/2] Update the CHANGES file to mention this new policy Maxime Ripard 2012-01-11 17:37 ` Peter Korsgaard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox