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

rc: rework reboot

see previous
parent c8cbd847
......@@ -2,8 +2,6 @@
<?php
/*
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
......@@ -29,32 +27,20 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/* parse the configuration and include all functions used below */
require_once("config.inc");
require_once("functions.inc");
require_once("filter.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]?
EOD;
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
echo <<<EOD
require_once('config.inc');
require_once('functions.inc');
require_once('filter.inc');
require_once('captiveportal.inc');
{$g['product_name']} is rebooting now.
$fp = fopen('php://stdin', 'r');
EOD;
echo "\n{$g['product_name']} will reboot.\n";
echo "This may take a minute, depending on your hardware.\n";
echo "\nDo you want to proceed [y|n]? ";
system_reboot_sync();
}
fclose($fp);
if (strcasecmp(chop(fgets($fp)), 'y') == 0) {
echo "\n{$g['product_name']} is rebooting now.\n\n";
system_reboot_sync();
}
?>
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