mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-29 20:23:01 +02:00
dhcp-client: don't assume we got option 1 (subnet)
If we don't get subnet, then just set the IP address. Issue #278 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Tobias Waldekranz
parent
08cec2e9bc
commit
faa6ce849b
@@ -105,7 +105,13 @@ case "$ACTION" in
|
||||
/usr/sbin/avahi-autoipd -c $interface && /usr/sbin/avahi-autoipd -k $interface
|
||||
fi
|
||||
|
||||
if /bin/ip addr add dev $interface $ip/$NETMASK $BROADCAST proto 5; then
|
||||
if [ -n "$NETMASK" ]; then
|
||||
IP=$ip/$NETMASK
|
||||
else
|
||||
IP=$ip
|
||||
fi
|
||||
|
||||
if /bin/ip addr add dev $interface $IP $BROADCAST proto 5; then
|
||||
echo "$ip" > "$IP_CACHE"
|
||||
fi
|
||||
if [ -n "$ipv6" ] ; then
|
||||
|
||||
Reference in New Issue
Block a user