diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-07-21 21:06:53 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-07-21 21:06:53 +0000 |
commit | 7ca5e0574e2860ba323f374087f0dfb9093ab2d1 (patch) | |
tree | 1817bafe0fa1dfe18aa0af02aa567a89f66d8905 /etc/rc.newwanip | |
parent | 39ac8421bb172f0993b9c377442728e162463882 (diff) | |
download | pfsense-7ca5e0574e2860ba323f374087f0dfb9093ab2d1.zip pfsense-7ca5e0574e2860ba323f374087f0dfb9093ab2d1.tar.gz |
Use friendly awk instead of cut.
Diffstat (limited to 'etc/rc.newwanip')
-rwxr-xr-x | etc/rc.newwanip | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip index a10a1f6..bf3e05f 100755 --- a/etc/rc.newwanip +++ b/etc/rc.newwanip @@ -47,13 +47,13 @@ $interface = "wan"; } - /* grab the prior ip for pftpx tests */ + /* grab the prior ip for pftpx tests */ if(file_exists("/tmp/rc.newwanip_oldip")) { $old_ip = file_get_contents("/tmp/rc.newwanip_oldip"); - $helpers = exec("/bin/ps awux | grep {$old_ip} | grep -v grep | cut -d\" \" -f6"); + $helpers = exec("/bin/ps awux | grep \"{$old_ip}\" | grep -v \"grep\" | awk '{ print $6 }'"); mwexec("kill " . trim($helpers)); unlink("/tmp/rc.newwanip_oldip"); - } + } /* reconfigure IPsec tunnels */ vpn_ipsec_configure(true); |