diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-11-19 05:26:00 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-11-19 05:26:00 +0000 |
commit | 851e7d41a668d338c7a9cc8ddecefb5ea0b771f6 (patch) | |
tree | 2c5676acff89335634f7e73313e4e3b7c50e63ae /etc/inc | |
parent | 13277cbf52fc372963305f91f94fb8415be0bc43 (diff) | |
download | pfsense-851e7d41a668d338c7a9cc8ddecefb5ea0b771f6.zip pfsense-851e7d41a668d338c7a9cc8ddecefb5ea0b771f6.tar.gz |
Only run ifconfig if a real ip and netmask exists instead of ifconfig $int /
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/interfaces.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 631fc48..dbb08ba 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -898,8 +898,9 @@ function interfaces_wan_configure() { escapeshellarg($wancfg['ipaddr'] . "/" . $wancfg['subnet']) . " " . escapeshellarg($wancfg['pointtopoint']) . " up"); } else { - mwexec("/sbin/ifconfig " . escapeshellarg($wancfg['if']) . " " . - escapeshellarg($wancfg['ipaddr'] . "/" . $wancfg['subnet'])); + if($wancfg['ipaddr'] && $wancfg['subnet']) + mwexec("/sbin/ifconfig " . escapeshellarg($wancfg['if']) . " " . + escapeshellarg($wancfg['ipaddr'] . "/" . $wancfg['subnet'])); } /* install default route */ mwexec("/sbin/route delete default", true); |