]> git.proxmox.com Git - ifupdown-pve.git/blame - wait-for-ll6.sh
Squashed 'src/' content from commit c732260
[ifupdown-pve.git] / wait-for-ll6.sh
CommitLineData
6f248ce1
TL
1#!/bin/sh
2
3attempts=${IF_LL_ATTEMPTS:-60}
4delay=${IF_LL_INTERVAL:-0.1}
5
6for attempt in $(seq 1 $attempts); do
7 lladdress=$(ip -6 -o a s dev "$IFACE" scope link -tentative)
8 if [ -n "$lladdress" ]; then
9 attempt=0
10 break
11 fi
12 sleep $delay
13done
14
15if [ $attempt -eq $attempts ]; then
16 echo "Could not get a link-local address"
17 exit 1
18fi