Commit 960f0968 authored by Franco Fichtner's avatar Franco Fichtner

rc: rework reboot

see previous
parent c8cbd847
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
<?php <?php
/* /*
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>. Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved. All rights reserved.
...@@ -29,32 +27,20 @@ ...@@ -29,32 +27,20 @@
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
/* parse the configuration and include all functions used below */ require_once('config.inc');
require_once("config.inc"); require_once('functions.inc');
require_once("functions.inc"); require_once('filter.inc');
require_once("filter.inc"); require_once('captiveportal.inc');
require_once("captiveportal.inc");
$fp = fopen('php://stdin', 'r');
echo <<<EOD
{$g['product_name']} will reboot. This may take a few minutes, depending on your hardware.
Do you want to proceed [y|n]? $fp = fopen('php://stdin', 'r');
EOD;
if (strcasecmp(chop(fgets($fp)), "y") == 0) { echo "\n{$g['product_name']} will reboot.\n";
echo "This may take a minute, depending on your hardware.\n";
echo <<<EOD echo "\nDo you want to proceed [y|n]? ";
{$g['product_name']} is rebooting now.
EOD;
if (strcasecmp(chop(fgets($fp)), 'y') == 0) {
echo "\n{$g['product_name']} is rebooting now.\n\n";
system_reboot_sync(); system_reboot_sync();
} }
fclose($fp);
?> fclose($fp);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment