blob: ca640fea06b210f8851e4c03a9d26fbb56142080 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 --force --no-ifdown
echo "${warn}failed, doing normal reboot${norm}"
fi
fi
echo -n "Rebooting... "
reboot -d -f -i
|