summaryrefslogtreecommitdiffstats
path: root/usr/local/www/reboot.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/reboot.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/reboot.php')
-rwxr-xr-xusr/local/www/reboot.php47
1 files changed, 18 insertions, 29 deletions
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");
?>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
-<?php if ($rebootmsg): echo print_info_box($rebootmsg); else: ?>
- <form action="reboot.php" method="post">
- <p><strong><?=gettext("Are you sure you want to reboot 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") . " "): ?>
+<meta http-equiv=\"refresh\" content=\"70;url=/\">
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+<?php print_info_box(gettext("The system is rebooting now. This may take one minute.")); ?>
+<pre>
+<?php system_reboot(); ?>
+</pre>
+<?php else: ?>
+<form action="reboot.php" method="post">
+ <p><strong><?=gettext("Are you sure you want to reboot 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>
</html>
-
-<?php
-if ($_POST) {
- $reply = " " . gettext("Yes") . " ";
- if ($_POST['Submit'] == $reply) {
- echo "<meta http-equiv=\"refresh\" content=\"70;url=/\">";
- system_reboot();
- $rebootmsg = gettext("The system is rebooting now. This may take a few minutes, depending on your hardware.");
- } else {
- exit;
- }
-}
-
-?>
OpenPOWER on IntegriCloud