summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2008-11-02 20:15:53 +0000
committerSeth Mos <seth.mos@xs4all.nl>2008-11-02 20:15:53 +0000
commit12169c92a56b11d64a296e6f810a7b382662dafe (patch)
tree9c0d03c99911296b6ea91b484913d1d3eb88fba5 /etc
parent413389f06dcbdca66fa48fae43cba383dc4e4875 (diff)
downloadpfsense-12169c92a56b11d64a296e6f810a7b382662dafe.zip
pfsense-12169c92a56b11d64a296e6f810a7b382662dafe.tar.gz
Add mute argument to mwexec
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/util.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 93d9aac..b10a445 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -408,7 +408,7 @@ function get_interface_list($mode = "active", $keyby = "physical", $vfaces = "")
}
/* wrapper for exec() */
-function mwexec($command) {
+function mwexec($command, $mute = false) {
global $g;
$oarr = array();
@@ -420,7 +420,7 @@ function mwexec($command) {
} else {
exec("$command 2>&1", $oarr, $retval);
}
- if($retval > 0) {
+ if(($retval <> 0) && ($mute === false)) {
$output = implode(" ", $oarr);
log_error("The command '$command' returned exit code '$retval', the output was '$output' ");
}
OpenPOWER on IntegriCloud