summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-04-27 19:51:26 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-04-27 19:51:26 +0000
commitbd90c7822701c24eed94ec8f46affada16b5e532 (patch)
treee7104219bc756d7d8233b958c809fd892dee8d64
parent9f241a6d2f602701d445b9ff2c801395618de56c (diff)
downloadpfsense-bd90c7822701c24eed94ec8f46affada16b5e532.zip
pfsense-bd90c7822701c24eed94ec8f46affada16b5e532.tar.gz
Trim carriage return off of the $old_ip so that the <> comparison works.
This should fix the packages from always being restarted even if the ip was the same.
-rwxr-xr-xetc/rc.newwanip4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip
index ec59915..0f3798e 100755
--- a/etc/rc.newwanip
+++ b/etc/rc.newwanip
@@ -65,13 +65,13 @@ if($curwanip == "0.0.0.0") {
/* grab the prior ip for pftpx tests */
if(file_exists("/tmp/rc.newwanip_oldip")) {
/* grab hint from dhclient */
- $old_ip = file_get_contents("/tmp/rc.newwanip_oldip");
+ $old_ip = trim(file_get_contents("/tmp/rc.newwanip_oldip", "\r");
unlink("/tmp/rc.newwanip_oldip");
}
/* fallback to rc.newwanip ip if needed */
if(!$old_ip)
if(file_exists("{$g['vardb_path']}/{$interface}_ip"))
- $old_ip = file_get_contents("{$g['vardb_path']}/{$interface}_ip");
+ $old_ip = trim(file_get_contents("{$g['vardb_path']}/{$interface}_ip", "\r");
if($old_ip) {
$helpers = exec("/bin/ps awux | grep \"{$old_ip}\" | grep -v \"grep\" | awk '{ print $2 }'");
if($helpers)
OpenPOWER on IntegriCloud