diff --git a/network-scripts/ifup-aliases b/network-scripts/ifup-aliases index 6178c080..87973d83 100755 --- a/network-scripts/ifup-aliases +++ b/network-scripts/ifup-aliases @@ -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 diff --git a/network-scripts/ifup-eth b/network-scripts/ifup-eth index f4aac864..38588b20 100755 --- a/network-scripts/ifup-eth +++ b/network-scripts/ifup-eth @@ -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 diff --git a/po/initscripts.pot b/po/initscripts.pot index 621edeec..434ba609 100644 --- a/po/initscripts.pot +++ b/po/initscripts.pot @@ -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 "" @@ -151,11 +159,11 @@ 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 "" @@ -163,23 +171,27 @@ msgstr "" 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 "" @@ -275,7 +287,11 @@ msgstr "" msgid "usage: ifup-routes []" 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 ""