aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/havp/havp.inc4
-rw-r--r--config/havp/havp_avset.xml7
-rw-r--r--config/ipguard/ipguard.inc6
-rw-r--r--config/lcdproc-dev/lcdproc.inc10
-rw-r--r--config/nut/nut.inc13
-rwxr-xr-xconfig/postfix/postfix.inc12
-rw-r--r--config/sarg/sarg.inc6
-rw-r--r--config/squid/squid.inc9
-rwxr-xr-xconfig/squid3/34/squid.inc6
-rw-r--r--config/sshdcond/sshdcond.inc6
10 files changed, 52 insertions, 27 deletions
diff --git a/config/havp/havp.inc b/config/havp/havp.inc
index 5ecfcc29..38412f31 100644
--- a/config/havp/havp.inc
+++ b/config/havp/havp.inc
@@ -521,12 +521,12 @@ function havp_reconfigure_cron() {
$optval = array("", "*/1", "*/2", "*/3", "*/4", "*/6", "*/8", "*/12", "0");
$opt = array("0", "*", "*", "*", "*", "root");
$opt[1] = $optval[$havp_config[F_HAVPUPDATE]];
- $on = ($opt[1] !== "");
+ $on = ($opt[1] != "");
$crontask = "/usr/bin/nice -n20 " . HVDEF_AVUPD_SCRIPT;
// Set new cron task or remove it if inactive
if ($on === true) {
- install_cron_job($crontask, $on, $opt);
+ install_cron_job($crontask, true, $opt[0], $opt[1], $opt[2], $opt[3], $opt[4], $opt[5]);
} else {
install_cron_job($crontask, false);
}
diff --git a/config/havp/havp_avset.xml b/config/havp/havp_avset.xml
index c6429724..0f8ac5e6 100644
--- a/config/havp/havp_avset.xml
+++ b/config/havp/havp_avset.xml
@@ -69,13 +69,12 @@
<tab>
<text>HAVP Log</text>
<url>/havp_log.php?logtab=havp</url>
- </tab>
- </tabs>
+ </tab>
<tab>
<text>Clamd Log</text>
<url>/havp_log.php?logtab=clamd</url>
- </tab>
- </tabs>
+ </tab>
+ </tabs>
<fields>
<field>
<fielddescr>ClamAV Database Update</fielddescr>
diff --git a/config/ipguard/ipguard.inc b/config/ipguard/ipguard.inc
index 53284c96..68e08e9f 100644
--- a/config/ipguard/ipguard.inc
+++ b/config/ipguard/ipguard.inc
@@ -41,7 +41,11 @@ function ipguard_custom_php_write_config() {
global $g, $config;
/* Detect boot process and do nothing */
- if (platform_booting()) {
+ if (function_exists("platform_booting")) {
+ if (platform_booting()) {
+ return;
+ }
+ } elseif ($g['booting']) {
return;
}
diff --git a/config/lcdproc-dev/lcdproc.inc b/config/lcdproc-dev/lcdproc.inc
index e9656afd..2282d4e3 100644
--- a/config/lcdproc-dev/lcdproc.inc
+++ b/config/lcdproc-dev/lcdproc.inc
@@ -139,12 +139,14 @@ function sync_package_lcdproc_screens() {
}
function sync_package_lcdproc() {
- global $g;
- global $config;
- global $input_errors;
+ global $g, $config, $input_errors;
# Detect boot process
- if (platform_booting()) {
+ if (function_exists("platform_booting")) {
+ if (platform_booting()) {
+ return;
+ }
+ } elseif ($g['booting']) {
return;
}
diff --git a/config/nut/nut.inc b/config/nut/nut.inc
index 71b06932..a864b965 100644
--- a/config/nut/nut.inc
+++ b/config/nut/nut.inc
@@ -492,8 +492,7 @@ EOD;
}
function sync_package_nut() {
- global $config;
- global $input_errors;
+ global $g, $config, $input_errors;
stop_service("nut");
@@ -509,10 +508,12 @@ EOD;
$return = sync_package_nut_snmp();
}
- if ((!platform_booting()) && (nut_config('monitor'))) {
- /* only start if enabled and system is not booting */
- /* this prevents service from starting / stopping / starting on boot */
-
+ /* only start if enabled and system is not booting */
+ /* this prevents service from starting / stopping / starting on boot */
+ if ((function_exists("platform_booting")) && (!platform_booting()) && (nut_config('monitor'))) {
+ log_error("[nut] INFO: Starting service");
+ start_service("nut");
+ } elseif ((!($g['booting'])) && (nut_config('monitor'))) {
log_error("[nut] INFO: Starting service");
start_service("nut");
} elseif (!$return && file_exists(NUT_RCFILE)) {
diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc
index f40922c6..0629c187 100755
--- a/config/postfix/postfix.inc
+++ b/config/postfix/postfix.inc
@@ -231,12 +231,18 @@ function check_cron(){
}
function sync_package_postfix($via_rpc="no") {
- global $config;
+ global $g, $config;
log_error("sync_package_postfix called with via_rpc={$via_rpc}");
# detect boot process
- if (is_array($_POST)){
- if (platform_booting()) {
+ if (is_array($_POST)) {
+ if (function_exists("platform_booting")) {
+ if (!platform_booting()) {
+ unset($boot_process);
+ } else {
+ $boot_process="on";
+ }
+ } elseif (!($g['booting'])) {
unset($boot_process);
} else {
$boot_process="on";
diff --git a/config/sarg/sarg.inc b/config/sarg/sarg.inc
index 446b5f82..85410560 100644
--- a/config/sarg/sarg.inc
+++ b/config/sarg/sarg.inc
@@ -192,7 +192,11 @@ function sync_package_sarg() {
global $config, $g, $sarg_proxy;
// detect boot process
- if (platform_booting()) {
+ if (function_exists("platform_booting")) {
+ if (platform_booting()) {
+ return;
+ }
+ } elseif ($g['booting']) {
return;
}
diff --git a/config/squid/squid.inc b/config/squid/squid.inc
index 27bff27b..5a0946bb 100644
--- a/config/squid/squid.inc
+++ b/config/squid/squid.inc
@@ -543,10 +543,15 @@ function squid_validate_auth($post, &$input_errors) {
}
function squid_install_cron($should_install) {
- global $config;
- if (platform_booting()) {
+ global $g, $config;
+ if (function_exists("platform_booting")) {
+ if (platform_booting()) {
+ return;
+ }
+ } elseif ($g['booting']) {
return;
}
+
parse_config(true);
if (is_array($config['installedpackages']['squidcache'])) {
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index 76deb94c..e5eb2f6c 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -309,7 +309,7 @@ function squid_install_command() {
/* make sure pinger is executable and suid root */
// XXX: Bug #5114
if (file_exists(SQUID_LOCALBASE. "/libexec/squid/pinger"))
- chmod(SQUID_LOCALBASE. "/libexec/squid/pinger", 4755);
+ chgrp(SQUID_LOCALBASE. "/libexec/squid/pinger", SQUID_GID);
// XXX: Is it really necessary?
if (file_exists("/usr/local/etc/rc.d/squid"))
@@ -1840,7 +1840,7 @@ function squid_resync($via_rpc="no") {
// detect boot process
if (is_array($_POST)) {
- if (platform_booting()) {
+ if (!platform_booting()) {
unset($boot_process);
} else {
$boot_process="on";
@@ -1880,7 +1880,7 @@ function squid_resync($via_rpc="no") {
/* make sure pinger is executable and suid root */
// XXX: Bug #5114
if (file_exists(SQUID_LOCALBASE . "/libexec/squid/pinger"))
- chmod(SQUID_LOCALBASE. "/libexec/squid/pinger", 4755);
+ chgrp(SQUID_LOCALBASE. "/libexec/squid/pinger", SQUID_GID);
$log_dir="";
// check if squid is enabled
diff --git a/config/sshdcond/sshdcond.inc b/config/sshdcond/sshdcond.inc
index c7c19291..9c3a8bb9 100644
--- a/config/sshdcond/sshdcond.inc
+++ b/config/sshdcond/sshdcond.inc
@@ -62,7 +62,11 @@ function sshdcond_custom_php_write_config() {
global $g, $config, $pkg_interface;
/* Detect boot process, do nothing during boot. */
- if (platform_booting()) {
+ if (function_exists("platform_booting")) {
+ if (platform_booting()) {
+ return;
+ }
+ } elseif ($g['booting']) {
return;
}