diff options
Diffstat (limited to 'src/lib/connections/mobile_ppp')
-rw-r--r-- | src/lib/connections/mobile_ppp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/connections/mobile_ppp b/src/lib/connections/mobile_ppp index 6df30d8..785457d 100644 --- a/src/lib/connections/mobile_ppp +++ b/src/lib/connections/mobile_ppp @@ -79,12 +79,15 @@ EOF } mobile_ppp_down() { - local options chat pidfile + local options chat pidfile pid options="$STATE_DIR/mobile_ppp.$Interface.$Profile/options" chat="$STATE_DIR/mobile_ppp.$Interface.$Profile/modem.chat" pidfile="/var/run/ppp-$Profile.pid" - [[ -r $pidfile ]] && kill "$(< "$pidfile")" + if [[ -r $pidfile ]]; then + read pid < "$pidfile" + (( pid )) && kill "$pid" + fi rm "$options" "$chat" rmdir "$(dirname "$options")" |