summaryrefslogtreecommitdiff
path: root/package/alix-switch/files/alix-switch
blob: b61a6a48f4664f30db2276f741279471d6e2d4cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# launched by alix-switchd in case of button event
# f.e. boot rescue system once
case "$1" in
  on)
    echo "alix-switch: on"
    mount /dev/sda1 /boot/grub
    grub-reboot 1
    umount /boot/grub
    reboot
    ;;
  off)
    echo "alix-switch: off"
    ;;
  *)
    echo "Usage: $0 {on|off}"
    ;;
esac
exit $?