add broadcast setting for /etc/config/network interfaces

SVN-Revision: 6225
lede-17.01
Felix Fietkau 2007-01-27 21:58:03 +00:00
parent 1668e52b8b
commit 2ff5dc759a
1 changed files with 3 additions and 1 deletions

View File

@ -124,10 +124,12 @@ setup_interface() {
config_get ip6addr "$config" ip6addr config_get ip6addr "$config" ip6addr
config_get gateway "$config" gateway config_get gateway "$config" gateway
config_get dns "$config" dns config_get dns "$config" dns
config_get bcast "$config" broadcast
[ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" [ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask"
[ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" inet6 add "$ip6addr" [ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" inet6 add "$ip6addr"
[ -z "$gateway" ] || route add default gw "$gateway" [ -z "$gateway" ] || $DEBUG route add default gw "$gateway"
[ -z "$bcast" ] || $DEBUG ifconfig "$iface" broadcast "$bcast"
[ -z "$dns" -o -f /tmp/resolv.conf.auto ] || { [ -z "$dns" -o -f /tmp/resolv.conf.auto ] || {
for ns in $dns; do for ns in $dns; do
echo "nameserver $ns" >> /tmp/resolv.conf.auto echo "nameserver $ns" >> /tmp/resolv.conf.auto