diff options
author | Darren 'Tadgy' Austin <darren@afterdark.org.uk> | 2018-07-28 01:04:39 +0100 |
---|---|---|
committer | Robby Workman <rworkman@slackware.com> | 2018-11-25 19:02:53 -0600 |
commit | 01a266b469db733b92df0a0b8651d68e0aa536f6 (patch) | |
tree | ab3ae46cd12c458f7be8183874e568af3b9c531e | |
parent | 715b71ad6a647d99559bf19cda2e3df9b56e0090 (diff) | |
download | slacknetsetup-01a266b469db733b92df0a0b8651d68e0aa536f6.tar.xz |
Add stateless RA auto configuration block
Signed-off-by: Robby Workman <rworkman@slackware.com>
-rw-r--r-- | rc.inet1 | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -250,7 +250,17 @@ if_up() { fi elif [ "${USE_STATELESS[$i]}" = "yes" ]; then # interface should configure itself via stateless RA auto config echo "/etc/rc.d/rc.inet1: using stateless Router Advertisement auto configuration for ${1}" | $LOGGER + echo "1" >/proc/sys/net/ipv6/conf/$1/accept_ra echo "1" >/proc/sys/net/ipv6/conf/$1/autoconf + /sbin/ip link set dev ${1} up + for i in {1..10}; do # Give some time for the interface to configure + /sbin/ip -6 address show dynamic dev ${1} 2>/dev/null | grep -Ewq 'inet6' && break + sleep 1 + done + if ! /sbin/ip -6 address show dynamic dev ${1} 2>/dev/null | grep -Ewq 'inet6'; then + echo "/etc/rc.d/rc.inet1: failed to auto configure ${1} after 10 seconds" | $LOGGER + fi + return else # interface is unconfigured debug_log "${1} interface is not configured in /etc/rc.d/rc.inet1.conf" fi |