Revision 30a61a89
Added by Ermal Luçi over 10 years ago
etc/rc.newwanip | ||
---|---|---|
43 | 43 |
require_once("IPv6.inc"); |
44 | 44 |
require_once("rrd.inc"); |
45 | 45 |
|
46 |
// Do not process while booting |
|
47 |
if (platform_booting()) |
|
48 |
return; |
|
49 |
|
|
50 | 46 |
function restart_packages() { |
51 | 47 |
global $oldip, $curwanip, $g; |
52 | 48 |
|
... | ... | |
89 | 85 |
$curwanip = get_interface_ip($interface); |
90 | 86 |
} |
91 | 87 |
|
92 |
log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface_descr}[{$interface}]) (real interface: {$interface_real})."); |
|
88 |
if (!platform_booting()) |
|
89 |
log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface_descr}[{$interface}]) (real interface: {$interface_real})."); |
|
93 | 90 |
|
94 | 91 |
/* |
95 | 92 |
* NOTE: Take care of openvpn, no-ip or similar interfaces if you generate the event to reconfigure an interface. |
... | ... | |
107 | 104 |
|
108 | 105 |
/* XXX: This really possible? */ |
109 | 106 |
if (empty($interface)) { |
107 |
if (platform_booting()) |
|
108 |
return; |
|
110 | 109 |
filter_configure(); |
111 | 110 |
restart_packages(); |
112 | 111 |
return; |
... | ... | |
117 | 116 |
$oldip = file_get_contents("{$g['vardb_path']}/{$interface}_cacheip"); |
118 | 117 |
|
119 | 118 |
/* regenerate resolv.conf if DNS overrides are allowed */ |
120 |
system_resolvconf_generate(true); |
|
119 |
if (!platform_booting()) |
|
120 |
system_resolvconf_generate(true); |
|
121 | 121 |
|
122 | 122 |
/* write the current interface IP to file */ |
123 | 123 |
if (is_ipaddr($curwanip)) |
... | ... | |
143 | 143 |
if (!empty($bridgetmp)) |
144 | 144 |
interface_bridge_add_member($bridgetmp, $interface_real); |
145 | 145 |
|
146 |
// Do not process while booting |
|
147 |
if (platform_booting()) |
|
148 |
return; |
|
149 |
|
|
146 | 150 |
/* make new hosts file */ |
147 | 151 |
system_hosts_generate(); |
148 | 152 |
|
Also available in: Unified diff
Fixes #4257 With the platform_booting() fixes a regression was done on openvpn tap interfaces or dynamic ones that are part of a bridge.
Allow during bootup rc.newwanip to continue up to a ceratin part to handle bridges or other complex interfaces.