mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
rc: rework reboot
see previous
This commit is contained in:
parent
c8cbd8471c
commit
960f096896
@ -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");
|
||||
require_once('config.inc');
|
||||
require_once('functions.inc');
|
||||
require_once('filter.inc');
|
||||
require_once('captiveportal.inc');
|
||||
|
||||
$fp = fopen('php://stdin', 'r');
|
||||
$fp = fopen('php://stdin', 'r');
|
||||
|
||||
echo <<<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]? ";
|
||||
|
||||
{$g['product_name']} will reboot. This may take a few minutes, depending on your hardware.
|
||||
if (strcasecmp(chop(fgets($fp)), 'y') == 0) {
|
||||
echo "\n{$g['product_name']} is rebooting now.\n\n";
|
||||
system_reboot_sync();
|
||||
}
|
||||
|
||||
Do you want to proceed [y|n]?
|
||||
EOD;
|
||||
|
||||
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
|
||||
|
||||
echo <<<EOD
|
||||
|
||||
{$g['product_name']} is rebooting now.
|
||||
|
||||
EOD;
|
||||
|
||||
system_reboot_sync();
|
||||
}
|
||||
|
||||
fclose($fp);
|
||||
|
||||
?>
|
||||
fclose($fp);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user