summaryrefslogtreecommitdiffstats
path: root/usr/local/www/halt.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-05-16 13:17:47 -0400
committerjim-p <jimp@pfsense.org>2012-05-16 13:17:47 -0400
commit9cf11774f2921b6ac7794b8e132eeb10bf2e7286 (patch)
tree2d810f17e97db0f2e2d8145b58352eae5b2d4626 /usr/local/www/halt.php
parent0b8e9d38d8bc8a53b4e6bb503f487dae425ca3fd (diff)
downloadpfsense-9cf11774f2921b6ac7794b8e132eeb10bf2e7286.zip
pfsense-9cf11774f2921b6ac7794b8e132eeb10bf2e7286.tar.gz
Fixup halt and reboot to catch the output from the shutdown process properly.
Conflicts: usr/local/www/halt.php usr/local/www/reboot.php
Diffstat (limited to 'usr/local/www/halt.php')
-rwxr-xr-xusr/local/www/halt.php32
1 files changed, 16 insertions, 16 deletions
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');
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
-<?php if ($rebootmsg): echo print_info_box($rebootmsg); else: ?>
- <form action="halt.php" method="post">
- <p><strong><?=gettext("Are you sure you want to halt the system?");?></strong></p>
- <p>
- <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes"); ?> ">
- <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No"); ?> ">
- </p>
- </form>
+<?php if ($_POST['Submit'] == " " . gettext("Yes") . " "):
+ print_info_box(gettext("The system is halting now. This may take one minute.")); ?>
+<pre>
+<?php system_halt(); ?>
+</pre>
+<?php else: ?>
+<form action="halt.php" method="post">
+ <p><strong><?=gettext("Are you sure you want to halt the system?");?></strong></p>
+ <p>
+ <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes"); ?> ">
+ <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No"); ?> ">
+ </p>
+</form>
<?php endif; ?>
<?php include("fend.inc"); ?>
</body>
OpenPOWER on IntegriCloud