From 9cf11774f2921b6ac7794b8e132eeb10bf2e7286 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 16 May 2012 13:17:47 -0400 Subject: Fixup halt and reboot to catch the output from the shutdown process properly. Conflicts: usr/local/www/halt.php usr/local/www/reboot.php --- usr/local/www/halt.php | 32 ++++++++++++++++---------------- usr/local/www/reboot.php | 47 ++++++++++++++++++----------------------------- 2 files changed, 34 insertions(+), 45 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/halt.php b/usr/local/www/halt.php index ae69291..442a2da 100755 --- a/usr/local/www/halt.php +++ b/usr/local/www/halt.php @@ -46,14 +46,9 @@ require("guiconfig.inc"); require("functions.inc"); require("captiveportal.inc"); -if ($_POST) { - if ($_POST['Submit'] != " No ") { - system_halt(); - $rebootmsg = gettext("The system is halting now. This may take a few minutes, depending on your hardware."); - } else { - header("Location: index.php"); - exit; - } +if ($_POST['Submit'] == " " . gettext("No") . " ") { + header("Location: index.php"); + exit; } $pgtitle = array(gettext("Diagnostics"),gettext("Halt system")); @@ -62,14 +57,19 @@ include('head.inc'); - -
-

-

- "> - "> -

-
+ +
+
+
+ +
+

+

+ "> + "> +

+
diff --git a/usr/local/www/reboot.php b/usr/local/www/reboot.php index 3f7eeda..f809b94 100755 --- a/usr/local/www/reboot.php +++ b/usr/local/www/reboot.php @@ -40,43 +40,32 @@ require("guiconfig.inc"); require("functions.inc"); require("captiveportal.inc"); -if ($_POST) { - if ($_POST['Submit'] == gettext(" Yes ")) { - $rebootmsg = gettext("The system is rebooting now. This may take a few minutes, depending on your hardware."); - } else { - Header("Location: /"); - } +if ($_POST['Submit'] == " " . gettext("No") . " ") { + header("Location: index.php"); + exit; } $pgtitle = array(gettext("Diagnostics"),gettext("Reboot System")); include("head.inc"); ?> - - -
-

-

- "> - "> -

-
+ + + + +
+
+
+ +
+

+

+ "> + "> +

+
- -"; - system_reboot(); - $rebootmsg = gettext("The system is rebooting now. This may take a few minutes, depending on your hardware."); - } else { - exit; - } -} - -?> -- cgit v1.1