mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Only delete a interface IP if it exists.
This commit is contained in:
parent
39e0413321
commit
18d8c406cd
@ -1586,9 +1586,10 @@ Would you like to remove the IP LAN address and
|
||||
unload the interface now? [y|n]?
|
||||
EODD;
|
||||
|
||||
if (strcasecmp(chop(fgets($fp)), "y") == 0)
|
||||
mwexec("/sbin/ifconfig delete " . $config['interfaces']['lan']);
|
||||
|
||||
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
|
||||
if($config['interfaces']['lan']['if'])
|
||||
mwexec("/sbin/ifconfig delete " . $config['interfaces']['lan']['if']);
|
||||
}
|
||||
unset($config['interfaces']['lan']);
|
||||
unset($config['dhcpd']['lan']);
|
||||
unset($config['interfaces']['lan']['if']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user