[packages] quicktun: Improve QuickTun init script
The new init script won't fail if quicktun takes more than 1 second to start. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> git-svn-id: svn://svn.openwrt.org/openwrt/packages@26488 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
829f13335e
commit
4d2d6b8681
@ -60,12 +60,14 @@ start_service() {
|
|||||||
|
|
||||||
eval env $OPTS "$SSD" -q -b -p "$PID" -m -x "$BIN" -S
|
eval env $OPTS "$SSD" -q -b -p "$PID" -m -x "$BIN" -S
|
||||||
|
|
||||||
sleep 1
|
while ! ifconfig "$interface" >/dev/null 2>&1; do
|
||||||
|
if ! $SSD -t -q -p $PID -x $BIN -K; then
|
||||||
|
echo "$s: daemon startup failed"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if ! ifconfig "$interface" >/dev/null 2>&1; then
|
sleep 1
|
||||||
echo "$s: daemon startup failed"
|
done
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
config_get up "$s" up
|
config_get up "$s" up
|
||||||
[ -n "$up" ] && sh -c "$up" - "$interface"
|
[ -n "$up" ] && sh -c "$up" - "$interface"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user