1# Compat enter hook shim for older dhcpcd versions 2 3IPADDR=$new_ip_address 4INTERFACE=$interface 5NETMASK=$new_subnet_mask 6BROADCAST=$new_broadcast_address 7NETWORK=$new_network_number 8DHCPSID=$new_dhcp_server_identifier 9GATEWAYS=$new_routers 10DNSSERVERS=$new_domain_name_servers 11DNSDOMAIN=$new_domain_name 12DNSSEARCH=$new_domain_search 13NISDOMAIN=$new_nis_domain 14NISSERVERS=$new_nis_servers 15NTPSERVERS=$new_ntp_servers 16 17GATEWAY= 18for x in $new_routers; do 19 GATEWAY="$GATEWAY${GATEWAY:+,}$x" 20done 21DNS= 22for x in $new_domain_name_servers; do 23 DNS="$DNS${DNS:+,}$x" 24done 25 26r="down" 27case "$reason" in 28RENEW) r="up";; 29BOUND|INFORM|REBIND|REBOOT|TEST|TIMEOUT|IPV4LL) r="new";; 30esac 31 32if [ "$r" != "down" ]; then 33 rm -f /var/lib/dhcpcd-"$INTERFACE".info 34 for x in IPADDR INTERFACE NETMASK BROADCAST NETWORK DHCPSID GATEWAYS \ 35 DNSSERVERS DNSDOMAIN DNSSEARCH NISDOMAIN NISSERVERS \ 36 NTPSERVERS GATEWAY DNS; do 37 eval echo "$x=\'\$$x\'" >> /var/lib/dhcpcd-"$INTERFACE".info 38 done 39fi 40 41set -- /var/lib/dhcpcd-"$INTERFACE".info "$r" 42