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:
parent
e0864fba86
commit
d94ecd6d94
@ -409,10 +409,11 @@ BOUND|RENEW|REBIND|REBOOT)
|
|||||||
if [ x$new_interface_mtu != x ] ; then
|
if [ x$new_interface_mtu != x ] ; then
|
||||||
/sbin/ip link set $interface mtu $new_interface_mtu
|
/sbin/ip link set $interface mtu $new_interface_mtu
|
||||||
fi
|
fi
|
||||||
if [ x$new_ip_address != x -a x$old_ip_address != x$new_ip_address ] || \
|
if [ x$new_ip_address != x ] && \
|
||||||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
|
[ 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} \
|
${new_broadcast_arg} \
|
||||||
dev $interface
|
dev $interface
|
||||||
|
|
||||||
@ -483,7 +484,7 @@ TIMEOUT)
|
|||||||
|
|
||||||
if [ x$new_ip_address != x -a x$old_ip_address != x$new_ip_address ];
|
if [ x$new_ip_address != x -a x$old_ip_address != x$new_ip_address ];
|
||||||
then
|
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} \
|
${new_broadcast_arg} \
|
||||||
dev $interface
|
dev $interface
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user