mirror of
https://github.com/tonusoo/koduinternet-cpe
synced 2024-11-14 07:11:00 +02:00
14 lines
587 B
Plaintext
14 lines
587 B
Plaintext
# Title : restore-static-ipv4-addrs
|
|
# Last modified date : 11.02.2023
|
|
# Author : Martin Tonusoo
|
|
# Description : Restores the permanent IPv4 addresses stored in a
|
|
# variable, which was populated by get-static-ipv4-addrs
|
|
# dhclient enter hook.
|
|
# Options :
|
|
# Notes : Script is meant to be run as a dhclient exit hook.
|
|
# Script is POSIX sh compliant.
|
|
|
|
for perm_addr in $perm_addrs; do
|
|
ip -4 addr add "$perm_addr" dev "$interface" >/dev/null 2>&1 || true
|
|
done
|