]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | ||
3 | attempts=${IF_LL_ATTEMPTS:-60} | |
4 | delay=${IF_LL_INTERVAL:-0.1} | |
5 | ||
6 | for 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 | |
13 | done | |
14 | ||
15 | if [ $attempt -eq $attempts ]; then | |
16 | echo "Could not get a link-local address" | |
17 | exit 1 | |
18 | fi |