summaryrefslogtreecommitdiffstats
path: root/etc/inc/services.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/services.inc')
-rw-r--r--etc/inc/services.inc46
1 files changed, 23 insertions, 23 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index e731357..313ad69 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -214,7 +214,7 @@ function services_dhcpdv4_configure() {
exec("cd /;LANG=C /usr/bin/tar -xzf {$g['cf_conf_path']}/dhcpleases.tgz 2>&1", $dhcprestore, $dhcpreturn);
$dhcprestore = implode(" ", $dhcprestore);
if($dhcpreturn <> 0) {
- log_error("DHCP leases restore failed exited with $dhcpreturn, the error is: $dhcprestore\n");
+ log_error(sprintf(gettext('DHCP leases restore failed exited with %1$s, the error is: %2$s%3$s'), $dhcpreturn, $dhcprestore, "\n"));
}
}
}
@@ -227,14 +227,14 @@ function services_dhcpdv4_configure() {
$Iflist = get_configured_interface_list();
if ($g['booting'])
- echo "Starting DHCP service...";
+ echo gettext("Starting DHCP service...");
else
sleep(1);
/* write dhcpd.conf */
$fd = fopen("{$g['dhcpd_chroot_path']}/etc/dhcpd.conf", "w");
if (!$fd) {
- printf("Error: cannot open dhcpd.conf in services_dhcpdv4_configure().\n");
+ printf(gettext("Error: cannot open dhcpd.conf in services_dhcpdv4_configure().%s"), "\n");
return 1;
}
@@ -305,7 +305,7 @@ EOD;
}
}
} else {
- log_error("Warning! DHCP Failover setup and no CARP virtual IP's defined!");
+ log_error(gettext("Warning! DHCP Failover setup and no CARP virtual IP's defined!"));
}
if($skew > 10) {
$type = "secondary";
@@ -851,7 +851,7 @@ EOD;
}
if ($g['booting']) {
- print "done.\n";
+ print gettext("done.") . "\n";
}
return 0;
@@ -901,14 +901,14 @@ EOD;
$igmpfl = fopen($g['tmp_path'] . "/igmpproxy.conf", "w");
if (!$igmpfl) {
- log_error("Could not write Igmpproxy configuration file!");
+ log_error(gettext("Could not write Igmpproxy configuration file!"));
return;
}
fwrite($igmpfl, $igmpconf);
fclose($igmpfl);
mwexec("/usr/local/sbin/igmpproxy -c " . $g['tmp_path'] . "/igmpproxy.conf");
- log_error("Started Igmpproxy service sucsesfully.");
+ log_error(gettext("Started Igmpproxy service sucsesfully."));
return 0;
}
@@ -930,7 +930,7 @@ function services_dhcrelay_configure() {
return 0;
if ($g['booting'])
- echo "Starting DHCP relay service...";
+ echo gettext("Starting DHCP relay service...");
else
sleep(1);
@@ -1056,7 +1056,7 @@ function services_dyndns_configure($int = "") {
if (is_array($dyndnscfg)) {
if ($g['booting'])
- echo "Starting DynDNS clients...";
+ echo gettext("Starting DynDNS clients...");
foreach ($dyndnscfg as $dyndns) {
if (!empty($int) && $int != $dyndns['interface'])
@@ -1068,7 +1068,7 @@ function services_dyndns_configure($int = "") {
}
if ($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
return 0;
@@ -1089,7 +1089,7 @@ function services_dnsmasq_configure() {
if (isset($config['dnsmasq']['enable'])) {
if ($g['booting'])
- echo "Starting DNS forwarder...";
+ echo gettext("Starting DNS forwarder...");
else
sleep(1);
@@ -1126,7 +1126,7 @@ function services_dnsmasq_configure() {
mwexec("/usr/local/sbin/dnsmasq --local-ttl 1 --all-servers {$dns_rebind} --dns-forward-max=5000 --cache-size=10000 {$args}");
if ($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
if (!$g['booting']) {
@@ -1153,12 +1153,12 @@ function services_snmpd_configure() {
if (isset($config['snmpd']['enable'])) {
if ($g['booting'])
- echo "Starting SNMP daemon... ";
+ echo gettext("Starting SNMP daemon... ");
/* generate snmpd.conf */
$fd = fopen("{$g['varetc_path']}/snmpd.conf", "w");
if (!$fd) {
- printf("Error: cannot open snmpd.conf in services_snmpd_configure().\n");
+ printf(gettext("Error: cannot open snmpd.conf in services_snmpd_configure().%s"),"\n");
return 1;
}
@@ -1306,7 +1306,7 @@ EOD;
"{$bindlan} -p {$g['varrun_path']}/snmpd.pid");
if ($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
return 0;
@@ -1704,8 +1704,8 @@ function configure_cron() {
if (is_array($config['cron']['item'])) {
$crontab_contents .= "#\n";
- $crontab_contents .= "# pfSense specific crontab entries\n";
- $crontab_contents .= "# Created: " . date("F j, Y, g:i a") . "\n";
+ $crontab_contents .= "# " . gettext("pfSense specific crontab entries") . "\n";
+ $crontab_contents .= "# " .gettext( "Created:") . " " . date("F j, Y, g:i a") . "\n";
$crontab_contents .= "#\n";
foreach ($config['cron']['item'] as $item) {
@@ -1719,8 +1719,8 @@ function configure_cron() {
}
$crontab_contents .= "\n#\n";
- $crontab_contents .= "# If possible do not add items to this file manually.\n";
- $crontab_contents .= "# If you do so, this file must be terminated with a blank line (e.g. new line)\n";
+ $crontab_contents .= "# " . gettext("If possible do not add items to this file manually.") . "\n";
+ $crontab_contents .= "# " . gettext("If you do so, this file must be terminated with a blank line (e.g. new line)") . "\n";
$crontab_contents .= "#\n\n";
}
@@ -1763,7 +1763,7 @@ function upnp_start() {
return;
if($config['installedpackages']['miniupnpd']['config'][0]['enable']) {
- echo "Starting UPnP service... ";
+ echo gettext("Starting UPnP service... ");
require_once('/usr/local/pkg/miniupnpd.inc');
sync_package_miniupnpd();
echo "done.\n";
@@ -1798,15 +1798,15 @@ function install_cron_job($command, $active=false, $minute="0", $hour="*", $mont
$cron_item['command'] = $command;
if(!$is_installed) {
$config['cron']['item'][] = $cron_item;
- write_config("Installed cron job for {$command}");
+ write_config(sprintf(gettext("Installed cron job for %s"), $command));
} else {
$config['cron']['item'][$x] = $cron_item;
- write_config("Updated cron job for {$command}");
+ write_config(sprintf(gettext("Updated cron job for %s"), $command));
}
} else {
if(($is_installed == true) && ($x > 0)) {
unset($config['cron']['item'][$x]);
- write_config("Remvoed cron job for {$command}");
+ write_config(sprintf(gettext("Remvoed cron job for %s"), $command));
}
}
configure_cron();
OpenPOWER on IntegriCloud