This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via a83bcf914c9214d522d99966386c0a989c651f0f (commit) from 4f175a1f579e087949ddf6bd514082d40c0b7b44 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit a83bcf914c9214d522d99966386c0a989c651f0f Author: Arne Fitzenreiter arne_f@ipfire.org Date: Sat Jan 25 22:22:26 2020 +0100
networking/red: wait only for carrier if device exists
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
-----------------------------------------------------------------------
Summary of changes: src/initscripts/networking/red | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-)
Difference in files: diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red index 7ce0a6f47..b619836ae 100644 --- a/src/initscripts/networking/red +++ b/src/initscripts/networking/red @@ -129,21 +129,23 @@ case "${1}" in ip route add default via ${GATEWAY} dev ${DEVICE} evaluate_retval - # has carrier ? - if [ ! "$(</sys/class/net/${DEVICE}/carrier)" = "1" ]; then - boot_mesg -n "Wait for carrier on ${DEVICE} " - for (( i=30; i>1; i-- )) do - if [ "$(</sys/class/net/${DEVICE}/carrier)" = "1" ]; then - break; - fi - boot_mesg -n "." - sleep 2 - done - boot_mesg "" + if [ -d "/sys/class/net/${DEVICE}" ]; then + # has carrier ? if [ ! "$(</sys/class/net/${DEVICE}/carrier)" = "1" ]; then - echo_failure - else - echo_ok + boot_mesg -n "Wait for carrier on ${DEVICE} " + for (( i=30; i>1; i-- )) do + if [ "$(</sys/class/net/${DEVICE}/carrier)" = "1" ]; then + break; + fi + boot_mesg -n "." + sleep 2 + done + boot_mesg "" + if [ ! "$(</sys/class/net/${DEVICE}/carrier)" = "1" ]; then + echo_failure + else + echo_ok + fi fi fi
hooks/post-receive -- IPFire 2.x development tree