summaryrefslogtreecommitdiff
path: root/package/alix-switch/files/alix-switch
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-06-28 13:23:59 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-06-28 13:23:59 +0200
commit35c8150f713288319398ef855bbee58a49c855dd (patch)
tree2f21ecef9a9ab2efe0f56c56875c202e91860343 /package/alix-switch/files/alix-switch
parent6274e55f29fa492a2a34c437354c8fcc22e8a3d4 (diff)
boot into rescue mode, when button is pressed once
Diffstat (limited to 'package/alix-switch/files/alix-switch')
-rw-r--r--package/alix-switch/files/alix-switch8
1 files changed, 6 insertions, 2 deletions
diff --git a/package/alix-switch/files/alix-switch b/package/alix-switch/files/alix-switch
index ad439a221..b61a6a48f 100644
--- a/package/alix-switch/files/alix-switch
+++ b/package/alix-switch/files/alix-switch
@@ -1,9 +1,13 @@
#!/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"
@@ -12,4 +16,4 @@ case "$1" in
echo "Usage: $0 {on|off}"
;;
esac
-exit 0
+exit $?