diff options
author | Ermal <eri@pfsense.org> | 2010-11-10 19:34:24 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-11-10 19:34:24 +0000 |
commit | b06d7ebb1d1d6468b180ddf24376c3f1063de625 (patch) | |
tree | 0bb3d8cce85a498a4cf13ca4f8617a602305b13a /etc | |
parent | 35d26b25a179e02745e22875a31d0465f48a8b9e (diff) | |
download | pfsense-b06d7ebb1d1d6468b180ddf24376c3f1063de625.zip pfsense-b06d7ebb1d1d6468b180ddf24376c3f1063de625.tar.gz |
Use exec and check return value of command to avoid priting messages of stderr to console.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index d1bc904..71030d6 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -126,9 +126,9 @@ function filter_pflog_start() { echo "filter_pflog_start() being called $mt\n"; } mute_kernel_msgs(); - $pid = 0; - $pid = `/bin/pgrep -f "tcpdump -s 256 -v -l -n -e -ttt -i pflog0"`; - if(!$pid) + $output = 0; + exec("/bin/pgrep -f 'tcpdump -s 256 -v -l -n -e -ttt -i pflog0'", $output, $retval); + if($retval != 0) mwexec_bg("/usr/sbin/tcpdump -s 256 -v -l -n -e -ttt -i pflog0 | logger -t pf -p local0.info"); unmute_kernel_msgs(); } @@ -2723,4 +2723,4 @@ function discover_pkg_rules($ruletype) { // vim: ts=4 sw=4 noexpandtab -?>
\ No newline at end of file +?> |