1
0

alix-switch 324 B

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