summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-12-10 13:20:33 +0545
committerPhil Davis <phil.davis@inf.org>2015-12-10 13:20:33 +0545
commit287f8e27674102ec0de56abc67583be3b1073ce4 (patch)
tree4452cb6d1a7328a97ae7d73ccf0741eca7e4a40e /src
parentc0499d48618013412a4b2ace07b04dde7a0df955 (diff)
downloadpfsense-287f8e27674102ec0de56abc67583be3b1073ce4.zip
pfsense-287f8e27674102ec0de56abc67583be3b1073ce4.tar.gz
Internationalize console reboot script
This file previously had to have a space after "Do you want to proceed [y|n]?" to make the prompt for user input nice. That made it one of the few exceptions to the code style guide, where lines are not supposed to have blank space at the end. Might as well have 1 less exception to the rule by internationalizing it, which removes the literal "EOD" echo output stuff.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/etc/rc.initial.reboot16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/etc/rc.initial.reboot b/src/etc/rc.initial.reboot
index 6f70407..fdcc480 100755
--- a/src/etc/rc.initial.reboot
+++ b/src/etc/rc.initial.reboot
@@ -37,21 +37,11 @@
$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;
+ echo "\n" . sprintf(gettext("%s will reboot. This may take a few minutes, depending on your hardware."), $g['product_name']) . "\n";
+ echo gettext("Do you want to proceed [y|n]?") . " ";
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
-
- echo <<<EOD
-
-{$g['product_name']} is rebooting now.
-
-EOD;
-
+ echo "\n" . sprintf(gettext("%s is rebooting now."), $g['product_name']) . "\n";
system_reboot_sync();
}
OpenPOWER on IntegriCloud