diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-06-28 13:23:59 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-06-28 13:23:59 +0200 |
commit | 35c8150f713288319398ef855bbee58a49c855dd (patch) | |
tree | 2f21ecef9a9ab2efe0f56c56875c202e91860343 /package/alix-switch/files | |
parent | 6274e55f29fa492a2a34c437354c8fcc22e8a3d4 (diff) |
boot into rescue mode, when button is pressed once
Diffstat (limited to 'package/alix-switch/files')
-rw-r--r-- | package/alix-switch/files/alix-switch | 8 | ||||
-rw-r--r-- | package/alix-switch/files/alix-switch.postinst | 2 |
2 files changed, 7 insertions, 3 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 $? diff --git a/package/alix-switch/files/alix-switch.postinst b/package/alix-switch/files/alix-switch.postinst index 6e0e60f12..28146bf44 100644 --- a/package/alix-switch/files/alix-switch.postinst +++ b/package/alix-switch/files/alix-switch.postinst @@ -1,3 +1,3 @@ #!/bin/sh . $IPKG_INSTROOT/etc/functions.sh -add_rcconf alix_switchd alix_switchd NO +add_rcconf alix_switch alix_switch YES |