Commit c3b4f751 authored by Jouke Witteveen's avatar Jouke Witteveen
Browse files

Only wait when necessary in PPP cleanup code

parent 2d7ec0b8
......@@ -91,9 +91,9 @@ mobile_ppp_down() {
if [[ -r $pidfile ]]; then
read pid < "$pidfile"
(( pid )) && kill "$pid"
# Allow pppd up to one second to clean up
timeout_wait 1 '[[ ! -f $pidfile ]]'
fi
# Allow pppd up to one second to clean up
timeout_wait 1 '[[ ! -f $pidfile ]]'
rm -r "$options_dir"
}
......
......@@ -67,9 +67,9 @@ pppoe_down() {
if [[ -r $pidfile ]]; then
read pid < "$pidfile"
(( pid )) && kill "$pid"
# Allow pppd up to one second to clean up
timeout_wait 1 '[[ ! -f $pidfile ]]'
fi
# Allow pppd up to one second to clean up
timeout_wait 1 '[[ ! -f $pidfile ]]'
rm "$options"
rmdir "$(dirname "$options")"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment