From 35c8150f713288319398ef855bbee58a49c855dd Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 28 Jun 2010 13:23:59 +0200 Subject: boot into rescue mode, when button is pressed once --- package/alix-switch/files/alix-switch | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'package/alix-switch/files/alix-switch') 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 $? -- cgit v1.2.3