summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-12-01 17:22:51 +0000
committerErmal <eri@pfsense.org>2010-12-01 17:23:11 +0000
commit435a418fc88dea53a8ec3e3d295d0701bb92cebf (patch)
treeb0d6b50eb258d232811976a736492c4782d394f3
parent893f47847b22a18cfaa1fc6185d001ec111597d7 (diff)
downloadpfsense-435a418fc88dea53a8ec3e3d295d0701bb92cebf.zip
pfsense-435a418fc88dea53a8ec3e3d295d0701bb92cebf.tar.gz
Do not spam console with useless messages. Also remove killall not needed anymore.
-rw-r--r--etc/inc/gwlb.inc4
-rw-r--r--etc/inc/util.inc15
2 files changed, 8 insertions, 11 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index ee2a2b1..0391e44 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -213,7 +213,7 @@ EOD;
log_error("Removing static route for monitor {$gateway['monitor']} and adding a new route through {$gateway['gateway']}");
mwexec("/sbin/route delete -host " . escapeshellarg($gateway['monitor']), true);
mwexec("/sbin/route add -host " . escapeshellarg($gateway['monitor']) .
- " " . escapeshellarg($gateway['gateway']));
+ " " . escapeshellarg($gateway['gateway']), true);
}
$apingerconfig .= $alarmscfg;
@@ -223,8 +223,6 @@ EOD;
fclose($fd);
killbypid("{$g['varrun_path']}/apinger.pid");
- // TEMPORARY XXX
- exec("/usr/bin/killall -9 apinger");
if (is_dir("{$g['tmp_path']}"))
chmod("{$g['tmp_path']}", 01777);
if (!is_dir("{$g['vardb_path']}/rrd"))
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 0aadc2f..6c40c45 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -38,7 +38,7 @@
/* kill a process by pid file */
function killbypid($pidfile) {
- sigkillbypid($pidfile, "TERM");
+ return sigkillbypid($pidfile, "TERM");
}
function isvalidpid($pid) {
@@ -808,17 +808,16 @@ function exec_command($command) {
/* wrapper for exec() */
function mwexec($command, $mute = false) {
-
global $g;
- $oarr = array();
- $retval = 0;
+
if ($g['debug']) {
if (!$_SERVER['REMOTE_ADDR'])
echo "mwexec(): $command\n";
- exec("$command 2>&1", $oarr, $retval);
- } else {
- exec("$command 2>&1", $oarr, $retval);
}
+ $oarr = array();
+ $retval = 0;
+ $garbage = exec("$command 2>&1", $oarr, $retval);
+
if(isset($config['system']['developerspew']))
$mute = false;
if(($retval <> 0) && ($mute === false)) {
@@ -1469,4 +1468,4 @@ function array_merge_recursive_unique($array0, $array1)
return $result;
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud