summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
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 /etc/inc/util.inc
parent893f47847b22a18cfaa1fc6185d001ec111597d7 (diff)
downloadpfsense-435a418fc88dea53a8ec3e3d295d0701bb92cebf.zip
pfsense-435a418fc88dea53a8ec3e3d295d0701bb92cebf.tar.gz
Do not spam console with useless messages. Also remove killall not needed anymore.
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r--etc/inc/util.inc15
1 files changed, 7 insertions, 8 deletions
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