db-move: moved seahorse from [testing] to [extra] (x86_64)
[arch-packages.git] / kexec-tools / trunk / kexec
blobc2e9a78a8bffb95a79d2bd01a566a84b36307726
1 #!/bin/bash
3 [ -f /etc/conf.d/kexec ] && . /etc/conf.d/kexec
5 . /etc/rc.conf
6 . /etc/rc.d/functions
8 case "$1" in
9 start)
10 stat_busy "Enabling kexec on reboot"
11 add_daemon kexec
12 stat_done
15 stop|load)
16 if [ "$RUNLEVEL" = "6" -o "$1" = "load" ]; then
17 stat_busy "Loading kexec kernel"
18 [ -f "$KPATH" ] || stat_fail
19 [ -f "$INITRD" ] && _INITRD="--initrd=$INITRD"
20 /sbin/kexec -l $KPATH --append="root=$ROOTPART $KPARAM" $_INITRD > /dev/null 2>&1
21 else
22 stat_busy "Disabling kexec on reboot"
24 if [ $? -eq 0 ] ; then
25 rm_daemon kexec
26 stat_done
27 else
28 stat_fail
29 fi
32 unload)
33 stat_busy "Unloading kexec kernel"
34 /sbin/kexec -u
35 if [ $? -eq 0 ] ; then
36 stat_done
37 else
38 stat_fail
43 echo "usage: $0 {start|stop|load|unload}"
44 esac
45 exit 0