From b3ee52abc51599c1b801015e428524412ffb71ba Mon Sep 17 00:00:00 2001 From: Steffen Sledz Date: Wed, 22 Apr 2009 11:10:49 +0200 Subject: initscripts: modifications for hipox machine - add kexec handling in /etc/init.d/reboot - make /sys available again for /etc/init.d/reboot --- recipes/initscripts/files/hipox/reboot | 19 +++++++++++++++++++ recipes/initscripts/initscripts_1.0.bb | 7 ++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 recipes/initscripts/files/hipox/reboot diff --git a/recipes/initscripts/files/hipox/reboot b/recipes/initscripts/files/hipox/reboot new file mode 100755 index 0000000000..af2da10d14 --- /dev/null +++ b/recipes/initscripts/files/hipox/reboot @@ -0,0 +1,19 @@ +#! /bin/sh +# +# reboot Execute the reboot command. +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +# Test if we should boot into the new kernel +if test -x /usr/sbin/kexec -a -f /sys/kernel/kexec_loaded ; then + read loaded < /sys/kernel/kexec_loaded + if test "$loaded" = "1" ; then + echo -n "Loaded kernel image found, executing ... " + /usr/sbin/kexec --exec + echo "${warn}failed, doing normal reboot${norm}" + fi +fi + +echo -n "Rebooting... " +reboot -d -f -i diff --git a/recipes/initscripts/initscripts_1.0.bb b/recipes/initscripts/initscripts_1.0.bb index 556fbe46b7..cbcfec5e18 100644 --- a/recipes/initscripts/initscripts_1.0.bb +++ b/recipes/initscripts/initscripts_1.0.bb @@ -4,7 +4,7 @@ PRIORITY = "required" DEPENDS = "makedevs" RDEPENDS = "makedevs" LICENSE = "GPL" -PR = "r113" +PR = "r114" SRC_URI = "file://functions \ file://halt \ @@ -130,3 +130,8 @@ do_install () { do_install_append_angstrom () { rm ${D}${sysconfdir}/init.d/devices ${D}${sysconfdir}/rcS.d/S05devices } + +# HIPOX needs /sys in reboot for kexec check +do_install_append_hipox () { + ln -sf ../init.d/sysfs.sh ${D}${sysconfdir}/rc6.d/S80sysfs +} -- cgit 1.2.3-korg