summaryrefslogtreecommitdiffstats
path: root/etc/rc.bootup
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@sullrich-MacBookPro.geekgod.com>2009-05-15 20:46:42 -0400
committerScott Ullrich <sullrich@sullrich-MacBookPro.geekgod.com>2009-05-15 20:46:42 -0400
commit745188c8860eacb92fbd518a872e38bb58a88d7e (patch)
tree84891a2df2480ed5f4a361323a120b753307c42a /etc/rc.bootup
parent70045f5f0bffb8ad7883fea147f61a983aa74bf2 (diff)
downloadpfsense-745188c8860eacb92fbd518a872e38bb58a88d7e.zip
pfsense-745188c8860eacb92fbd518a872e38bb58a88d7e.tar.gz
* Add Erik Kristensen to (C)
* Compact code
Diffstat (limited to 'etc/rc.bootup')
-rwxr-xr-xetc/rc.bootup25
1 files changed, 5 insertions, 20 deletions
diff --git a/etc/rc.bootup b/etc/rc.bootup
index e6d24c3..a946832 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -7,6 +7,7 @@
originally based on m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2004-2009 Scott Ullrich <sullrich@pfsense.org>.
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
+ Copyright (C) 2009 Erik Kristensen
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -31,48 +32,32 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-
function rescue_detect_keypress() {
-
- /**
- *
- * Author: Erik Kristensen
- * Project: pfSense 2.0
- * Date: 15 May 2009
- * License: BSD License
- *
- */
-
// How long do you want the script to wait before moving on (in seconds)
$timeout=3;
-
echo "Press R to enter Recovery Mode.\n\n";
echo "Recovery mode can assist by rescuing config.xml from a \n";
echo "installed hard disk that is having problems, etc.\n\n";
echo "Timeout (seconds): {$timeout}\n";
-
$key = null;
while(!in_array($key, array("r","R"))) {
-
echo "\033[08m{$timeout}\n";
-
`stty -icanon min 0 time 10`;
$key = trim(`KEY=\`dd count=1 2>/dev/null\`; echo \$KEY`);
`stty icanon`;
-
// Decrement our timeout value
$timeout--;
-
// If we have reached 0 exit and continue on
if ($timeout == 0)
break;
}
-
// If r was pressed do our logic here
if (in_array($key, array("r", "R"))) {
system("env TERM=vt102 /scripts/lua_installer_rescue");
}
-
+ if (in_array($key, array("i", "I"))) {
+ system("env TERM=vt102 /scripts/lua_installer");
+ }
}
echo " done.\n";
@@ -337,4 +322,4 @@ mwexec_bg("/usr/sbin/update_dns_cache.sh");
unlink("{$g['varrun_path']}/booting");
$g['booting'] = FALSE;
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud