forked from pool/kexec-tools
This commit is contained in:
parent
8c2ff91cbc
commit
18b0591328
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 13 16:41:27 CEST 2008 - bwalle@suse.de
|
||||
|
||||
- Fix runlevels (Default-Start, Default-Stop) in kexec.init.
|
||||
- Only load kexec kernel when kexec reboot is enabled when the
|
||||
target runlevel is 6 (reboot) to avoid slowdown of shutdown in
|
||||
that case.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 09 19:00:04 CEST 2008 - bwalle@suse.de
|
||||
|
||||
|
@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq
|
||||
AutoReqProv: on
|
||||
Summary: Tools for fast kernel loading
|
||||
Version: 2.0.0
|
||||
Release: 39
|
||||
Release: 40
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source1: kexec-bootloader
|
||||
Source2: kexec-bootloader.8.txt
|
||||
@ -146,6 +146,11 @@ install -m 0755 kexec.init ${RPM_BUILD_ROOT}/etc/init.d/kexec
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Oct 13 2008 bwalle@suse.de
|
||||
- Fix runlevels (Default-Start, Default-Stop) in kexec.init.
|
||||
- Only load kexec kernel when kexec reboot is enabled when the
|
||||
target runlevel is 6 (reboot) to avoid slowdown of shutdown in
|
||||
that case.
|
||||
* Thu Oct 09 2008 bwalle@suse.de
|
||||
- PPC64: Use return value of count_dyn_reconf_memory_ranges().
|
||||
* Thu Oct 09 2008 bwalle@suse.de
|
||||
|
36
kexec.init
36
kexec.init
@ -5,12 +5,12 @@
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: kexec
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Start: $null
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: $null
|
||||
# Default-Stop: 1 2 3 5
|
||||
# Required-Stop: $local_fs $remote_fs
|
||||
# Default-Start: 1 2 3 5 S
|
||||
# Default-Stop: 1 2 3 5 S
|
||||
# Short-Description: Enables reboot through kexec
|
||||
# Description: Enables reboot through kexec
|
||||
### END INIT INFO
|
||||
@ -23,19 +23,25 @@ case "$1" in
|
||||
start)
|
||||
;;
|
||||
stop)
|
||||
if ! [ -f /sys/kernel/kexec_loaded ] ; then
|
||||
echo -n "Cannot check if kexec kernel has been loaded."
|
||||
rc_failed
|
||||
else
|
||||
read -t 2 kexec_loaded < /sys/kernel/kexec_loaded
|
||||
if [ "$kexec_loaded" -ne 0 ] ; then
|
||||
echo -n "kexec kernel already loaded."
|
||||
rc_status -s
|
||||
# Only execute that script if we're going to reboot the system.
|
||||
if [ "$RUNLEVEL" -eq 6 ] ; then
|
||||
if ! [ -f /sys/kernel/kexec_loaded ] ; then
|
||||
echo -n "Cannot check if kexec kernel has been loaded."
|
||||
rc_failed
|
||||
else
|
||||
echo -n "Loading kexec kernel for reboot ..."
|
||||
$KEXEC_BOOTLOADER
|
||||
rc_status -v
|
||||
read -t 2 kexec_loaded < /sys/kernel/kexec_loaded
|
||||
if [ "$kexec_loaded" -ne 0 ] ; then
|
||||
echo -n "kexec kernel already loaded."
|
||||
rc_status -s
|
||||
else
|
||||
echo -n "Loading kexec kernel for reboot ..."
|
||||
$KEXEC_BOOTLOADER
|
||||
rc_status -v
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Loading kexec kernel ..."
|
||||
rc_status -s
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
|
Loading…
Reference in New Issue
Block a user