aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-11 10:40:53 +0000
committerRoy Marples <roy@marples.name>2007-04-11 10:40:53 +0000
commit64c4d3875d610191658fb05d9317086fdb72257c (patch)
tree772139d4ce58ff6aef49e0abeaaeea56eeddfed6 /sh
parentf754c661f57225b92ab72ce8867607341efa0c53 (diff)
Move carrier detection back into net.sh. Reserve a new hook numbers
Diffstat (limited to 'sh')
-rwxr-xr-xsh/net.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/sh/net.sh b/sh/net.sh
index 22c22150..3f62105b 100755
--- a/sh/net.sh
+++ b/sh/net.sh
@@ -68,13 +68,15 @@ _wait_for_carrier() {
sleep 1
if _has_carrier ; then
[ -z "${RC_EBUFFER}" ] && echo
+ eend 0
return 0
fi
timeout=$((${timeout} - 1))
- [ -z "${RC_EBUFFER}" ] && echo -n "."
+ [ -z "${RC_EBUFFER}" ] && printf "."
done
- echo
+ [ -z "${RC_EBUFFER}" ] && echo
+ eend 1
return 1
}
@@ -392,6 +394,16 @@ start() {
fi
done
+ if ! _wait_for_carrier ; then
+ if service_started devd ; then
+ ewarn "no carrier, but devd will start us when we have one"
+ mark_service_inactive "${SVCNAME}"
+ else
+ eerror "no carrier"
+ fi
+ return 1
+ fi
+
local config= config_index=
_load_config
config_index=0