diff options
author | Steffen Sledz <sledz@dresearch.de> | 2009-04-22 11:10:49 +0200 |
---|---|---|
committer | Steffen Sledz <sledz@dresearch.de> | 2009-04-22 11:10:49 +0200 |
commit | b3ee52abc51599c1b801015e428524412ffb71ba (patch) | |
tree | 5a773f80231b2df39d1bba75826ee0b9da136676 /recipes/initscripts/files | |
parent | fbc3617d2d78d7bf597e4bc657c9c0289d24c8b4 (diff) |
initscripts: modifications for hipox machine
- add kexec handling in /etc/init.d/reboot
- make /sys available again for /etc/init.d/reboot
Diffstat (limited to 'recipes/initscripts/files')
-rwxr-xr-x | recipes/initscripts/files/hipox/reboot | 19 |
1 files changed, 19 insertions, 0 deletions
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 |