summaryrefslogtreecommitdiffstats
path: root/etc/rc.newwanip
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-07-21 21:06:53 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-07-21 21:06:53 +0000
commit7ca5e0574e2860ba323f374087f0dfb9093ab2d1 (patch)
tree1817bafe0fa1dfe18aa0af02aa567a89f66d8905 /etc/rc.newwanip
parent39ac8421bb172f0993b9c377442728e162463882 (diff)
downloadpfsense-7ca5e0574e2860ba323f374087f0dfb9093ab2d1.zip
pfsense-7ca5e0574e2860ba323f374087f0dfb9093ab2d1.tar.gz
Use friendly awk instead of cut.
Diffstat (limited to 'etc/rc.newwanip')
-rwxr-xr-xetc/rc.newwanip6
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);
OpenPOWER on IntegriCloud