diff options
author | Scott Ullrich <sullrich@ScottUllrichImac.local> | 2010-05-18 17:27:15 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@ScottUllrichImac.local> | 2010-05-18 17:27:15 -0400 |
commit | 15f1488904c0bd3a1b8d843f90b22587b5700936 (patch) | |
tree | 7fdd7b81f911269772c48f6a35ca8866a3f45d08 /etc/inc | |
parent | 2e6a43a13c449ae0c486989cb60fd47e9fe541f1 (diff) | |
download | pfsense-15f1488904c0bd3a1b8d843f90b22587b5700936.zip pfsense-15f1488904c0bd3a1b8d843f90b22587b5700936.tar.gz |
Add reset button support to alix/wrap. Obtained-from: m0n0wall
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/system.inc | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index c3502c8..6ea3b9b 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -1339,4 +1339,34 @@ function enable_watchdog() { exec("/usr/sbin/watchdogd"); } } -?> + +function system_check_reset_button() { + $specplatform = system_identify_specific_platform(); + + if ($specplatform['name'] != "wrap" && $specplatform['name'] != "alix") + return 0; + + $retval = mwexec("/usr/local/sbin/" . $specplatform['name'] . "resetbtn"); + + if ($retval == 99) { + /* user has pressed reset button for 2 seconds - + reset to factory defaults */ + echo <<<EOD + +*********************************************************************** +* Reset button pressed - resetting configuration to factory defaults. * +* The system will reboot after this completes. * +*********************************************************************** + + +EOD; + + reset_factory_defaults(); + system_reboot_sync(); + exit(0); + } + + return 0; +} + +?>
\ No newline at end of file |