diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 2 | ||||
-rw-r--r-- | etc/inc/gwlb.inc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 6526d44..e0cff7e 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -106,7 +106,7 @@ function flowtable_configure() { else $maxstates = 150000; // nmbflows cpu count * ($maxstates * 2) - $cpus = trim(`/sbin/sysctl -n kern.smp.cpus`, " \n"); + $cpus = trim(exec('/sbin/sysctl -n kern.smp.cpus'), " \n"); $nmbflows = ($cpus*($maxstates*2)); // Flowtable currently only works on 8.0 if(get_freebsd_version() == "8") { diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index e5c5058..6935e9a 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -754,7 +754,7 @@ function fixup_default_gateway($ipprotocol, $gateways_status, $gateways_arr) { mwexec("/sbin/route change {$inetfamily} default {$gateways_arr[$upgw]['gateway']}"); } } else { - $defaultgw = trim(`/sbin/route -n get -{$ipprotocol} default | /usr/bin/grep gateway | /usr/bin/sed 's/gateway://g'`, " \n"); + $defaultgw = trim(exec("/sbin/route -n get -{$ipprotocol} default | /usr/bin/awk '/gateway:/ {print $2}'"), " \n"); if(is_ipaddrv6($gateways_arr[$dfltgwname]['gateway'])) { $inetfamily = "-inet6"; } else { |