Without this broadcast address is not set. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- network | 4 ++-- rc.conf | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/network b/network index b8c900d..06131a2 100755 --- a/network +++ b/network @@ -26,13 +26,13 @@ network_up() { ip link set dev $interface up || return 1 if [[ $address ]]; then - for var in netmask gateway; do + for var in netmask broadcast gateway; do if [[ -z ${!var} ]]; then printf "${C_FAIL}Error: static address defined without $var!\n" return 1 fi done - ip addr add $address/$netmask dev $interface || return 1 + ip addr add $address/$netmask broadcast $broadcast dev $interface || return 1 ip route add default via $gateway || return 1 else dhcpcd $DHCPCD_ARGS $interface || return 1 diff --git a/rc.conf b/rc.conf index b9c468a..36fd4c7 100644 --- a/rc.conf +++ b/rc.conf @@ -65,12 +65,14 @@ HOSTNAME="myhost" # - interface: name of device (required) # - address: IP address (leave blank for DHCP) # - netmask: subnet mask (ignored for DHCP) +# - broadcast: broadcast address (ignored for DHCP) # - gateway: default route (ignored for DHCP) # # Static IP example # interface=eth0 # address=192.168.0.2 # netmask=255.255.255.0 +# broadcast=192.168.0.255 # gateway=192.168.0.1 # # DHCP example @@ -82,6 +84,7 @@ HOSTNAME="myhost" interface= address= netmask= +broadcast= gateway= # Setting this to "yes" will skip network shutdown. -- 1.7.5.2