summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@sullrich-MacBookPro.geekgod.com>2009-05-16 21:42:24 -0400
committerScott Ullrich <sullrich@sullrich-MacBookPro.geekgod.com>2009-05-16 21:42:24 -0400
commit68235416057c4e2994f07344346d3be6d98c2090 (patch)
tree18fc378dc9c0d0b7e198633a2139ba0f400a6dce /etc
parenta685cb872eb2d9ea5243cf1dda7a285c33aecbbf (diff)
downloadpfsense-68235416057c4e2994f07344346d3be6d98c2090.zip
pfsense-68235416057c4e2994f07344346d3be6d98c2090.tar.gz
Actually detect all key presses, cleanup code a bit.
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.bootup14
1 files changed, 10 insertions, 4 deletions
diff --git a/etc/rc.bootup b/etc/rc.bootup
index cfc75f3..108acb8 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -42,9 +42,9 @@ function rescue_detect_keypress() {
echo "from a broken hard disk installation, etc.\n\n";
echo "Alternatively the installer may be invoked now if you do \n";
echo "not wish to boot into the liveCD environment at this time.\n\n";
- echo "Timeout before auto boot continues (seconds): {$timeout}";
+ echo "Timeout before auto boot continues (seconds): ";
$key = null;
- while(!in_array($key, array("r","R"))) {
+ while(!in_array($key, array("r","R", "i", "I", "~", "!"))) {
echo " {$timeout}";
`/bin/stty -icanon min 0 time 25`;
$key = trim(`KEY=\`dd count=1 2>/dev/null\`; echo \$KEY`);
@@ -57,14 +57,20 @@ function rescue_detect_keypress() {
}
// If R or I was pressed do our logic here
if (in_array($key, array("r", "R"))) {
- system("env TERM=cons25 /scripts/lua_installer_rescue");
+ putenv("TERM=cons25");
+ echo "\n\nRecovery mode selected...\n";
+ system("/usr/bin/env TERM=cons25 /bin/tcsh -c /scripts/lua_installer_rescue");
} elseif (in_array($key, array("i", "I"))) {
- system("env TERM=cons25 /scripts/lua_installer");
+ putenv("TERM=cons25");
+ echo "\n\nInstaller mode selected...\n";
+ system("/usr/bin/env TERM=cons25 /bin/tcsh -c /scripts/lua_installer");
if(file_exists("/tmp/install_complete")) {
system("/etc/rc.reboot");
exit;
}
} elseif (in_array($key, array("!", "~"))) {
+ putenv("TERM=cons25");
+ echo "\n\nRecovery shell selected...\n";
echo "\n";
touch("/tmp/donotbootup");
exit;
OpenPOWER on IntegriCloud