mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-19 10:02:33 +01:00
18 lines
467 B
Plaintext
18 lines
467 B
Plaintext
|
#! /bin/bash
|
||
|
case $reason in
|
||
|
BOUND|RENEW|REBIND|REBOOT)
|
||
|
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:-32} \
|
||
|
${new_broadcast_arg} \
|
||
|
dev $interface
|
||
|
fi
|
||
|
;;
|
||
|
EXPIRE|FAIL|RELEASE|STOP)
|
||
|
if [ x$old_ip_address != x ]; then
|
||
|
/sbin/ip -4 addr flush dev $interface
|
||
|
fi
|
||
|
;;
|
||
|
esac
|