Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion network-scripts/ifup-aliases
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,17 @@ function new_interface ()
ARPING=$(/sbin/arping -c 2 -w ${ARPING_WAIT:-3} -D -I ${parent_device} ${IPADDR})
if [ $? = 1 ]; then
ARPINGMAC=$(echo $ARPING | sed -ne 's/.*\[\(.*\)\].*/\1/p')
net_log $"Error, some other host ($ARPINGMAC) already uses address ${IPADDR}."
if [ -n "${ARPINGMAC}" ]; then
net_log $"Error, some other host ($ARPINGMAC) already uses address ${IPADDR}."
return 1
fi
# Check if arping failed because interface is not ready (no packets sent)
if echo "$ARPING" | grep -q "Sent 0 probes"; then
net_log $"Failed to bring up ${DEVICE}: interface not ready (no packets sent). Try increasing ARPING_WAIT or LINKDELAY, or check interface status."
return 1
fi
# Some other arping failure
net_log $"Error, some other host already uses address ${IPADDR}."
return 1
fi
fi
Expand Down
12 changes: 11 additions & 1 deletion network-scripts/ifup-eth
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,19 @@ else
net_log $"Error, some other host ($ARPINGMAC) already uses address ${ipaddr[$idx]}."
exit 1
fi
# Check if arping failed because interface is not ready (no packets sent)
if echo "$ARPING" | grep -q "Sent 0 probes"; then
# Interface not ready, continue retrying
continue
fi
done
if [ "${tries}" -eq "${ARPING_TRIES}" ]; then
net_log $"arping failed after $tries tries"
# Check if the failure was due to interface not being ready
if echo "$ARPING" | grep -q "Sent 0 probes"; then
net_log $"Failed to bring up ${DEVICE}: interface not ready (no packets sent). Try increasing ARPING_WAIT or LINKDELAY, or check interface status."
else
net_log $"arping failed after $tries tries"
fi
exit 1
fi
fi
Expand Down
38 changes: 27 additions & 11 deletions po/initscripts.pot
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,23 @@ msgstr ""
msgid "Determining if IP address ${IPADDR} is already in use for device ${parent_device}…"
msgstr ""

#: ../network-scripts/ifup-aliases:273
#: ../network-scripts/ifup-aliases:274
msgid "Error, some other host ($ARPINGMAC) already uses address ${IPADDR}."
msgstr ""

#: ../network-scripts/ifup-aliases:335
#: ../network-scripts/ifup-aliases:279 ../network-scripts/ifup-eth:313
msgid "Failed to bring up ${DEVICE}: interface not ready (no packets sent). Try increasing ARPING_WAIT or LINKDELAY, or check interface status."
msgstr ""

#: ../network-scripts/ifup-aliases:283
msgid "Error, some other host already uses address ${IPADDR}."
msgstr ""

#: ../network-scripts/ifup-aliases:345
msgid "error in $FILE: IPADDR_START and IPADDR_END don't agree"
msgstr ""

#: ../network-scripts/ifup-aliases:340
#: ../network-scripts/ifup-aliases:350
msgid "error in $FILE: IPADDR_START greater than IPADDR_END"
msgstr ""

Expand Down Expand Up @@ -151,35 +159,39 @@ msgstr ""
msgid " failed; no link present. Check cable?"
msgstr ""

#: ../network-scripts/ifup-eth:241 ../network-scripts/ifup-eth:389
#: ../network-scripts/ifup-eth:241 ../network-scripts/ifup-eth:406
msgid " done."
msgstr ""

#: ../network-scripts/ifup-eth:244 ../network-scripts/ifup-eth:391
#: ../network-scripts/ifup-eth:244 ../network-scripts/ifup-eth:408
msgid " failed."
msgstr ""

#: ../network-scripts/ifup-eth:268
msgid "Failed to bring up ${DEVICE}."
msgstr ""

#: ../network-scripts/ifup-eth:299
#: ../network-scripts/ifup-eth:301
msgid "Error, some other host ($ARPINGMAC) already uses address ${ipaddr[$idx]}."
msgstr ""

#: ../network-scripts/ifup-eth:306
#: ../network-scripts/ifup-eth:315
msgid "arping failed after $tries tries"
msgstr ""

#: ../network-scripts/ifup-eth:323
msgid "Error adding address ${ipaddr[$idx]} for ${DEVICE}."
msgstr ""

#: ../network-scripts/ifup-eth:333
#: ../network-scripts/ifup-eth:350
msgid "Error adding default gateway ${GATEWAY} for ${DEVICE}."
msgstr ""

#: ../network-scripts/ifup-eth:338
#: ../network-scripts/ifup-eth:355
msgid "Error adding default gateway for ${REALDEVICE}."
msgstr ""

#: ../network-scripts/ifup-eth:376
#: ../network-scripts/ifup-eth:393
msgid "Determining IPv6 information for ${DEVICE}..."
msgstr ""

Expand Down Expand Up @@ -275,7 +287,11 @@ msgstr ""
msgid "usage: ifup-routes <net-device> [<nickname>]"
msgstr ""

#: ../network-scripts/ifup-routes:26 ../network-scripts/ifup-routes:47
#: ../network-scripts/ifup-routes:20
msgid "Route entries are not sequentially ordered. Skipping $1 file"
msgstr ""

#: ../network-scripts/ifup-routes:33 ../network-scripts/ifup-routes:54
msgid "Failed to add route ${line}, using ip route replace instead."
msgstr ""

Expand Down