projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add checks for {ip,ip6}addr in the network config
[openwrt.git]
/
package
/
base-files
/
files
/
lib
/
network
/
config.sh
diff --git
a/package/base-files/files/lib/network/config.sh
b/package/base-files/files/lib/network/config.sh
index
f3ead6a
..
96890ac
100755
(executable)
--- a/
package/base-files/files/lib/network/config.sh
+++ b/
package/base-files/files/lib/network/config.sh
@@
-117,8
+117,8
@@
setup_interface() {
config_get gateway "$config" gateway
config_get dns "$config" dns
config_get gateway "$config" gateway
config_get dns "$config" dns
- $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask"
- $DEBUG ifconfig "$iface" inet6 add "$ip6addr"
+
[ -z "$ipaddr" ] ||
$DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask"
+
[ -z "$ip6addr" ] ||
$DEBUG ifconfig "$iface" inet6 add "$ip6addr"
[ -z "$gateway" ] || route add default gw "$gateway"
[ -z "$dns" -o -f /tmp/resolv.conf.auto ] || {
for ns in $dns; do
[ -z "$gateway" ] || route add default gw "$gateway"
[ -z "$dns" -o -f /tmp/resolv.conf.auto ] || {
for ns in $dns; do
This page took
0.024513 seconds
and
4
git commands to generate.