SHA256
1
0
forked from pool/dhcp

Fixed to have a netmask default in case require gets removed

from config, fixed old / new ip address checks

OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=22
This commit is contained in:
Marius Tomaschewski 2010-05-11 11:22:47 +00:00 committed by Git OBS Bridge
parent e0864fba86
commit d94ecd6d94

View File

@ -409,10 +409,11 @@ BOUND|RENEW|REBIND|REBOOT)
if [ x$new_interface_mtu != x ] ; then
/sbin/ip link set $interface mtu $new_interface_mtu
fi
if [ x$new_ip_address != x -a x$old_ip_address != x$new_ip_address ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
if [ x$new_ip_address != x ] && \
[ x$new_ip_address != x$old_ip_address -o \
x$reason = xBOUND -o x$reason = xREBOOT ]; then
/sbin/ip addr add $new_ip_address/$new_subnet_mask \
/sbin/ip addr add $new_ip_address/${new_subnet_mask:-32} \
${new_broadcast_arg} \
dev $interface
@ -483,7 +484,7 @@ TIMEOUT)
if [ x$new_ip_address != x -a x$old_ip_address != x$new_ip_address ];
then
/sbin/ip addr add $new_ip_address/$new_subnet_mask \
/sbin/ip addr add $new_ip_address/${new_subnet_mask:-32} \
${new_broadcast_arg} \
dev $interface