Add "hup" and "stop" commands. Closes PR bin/12135.
This commit is contained in:
parent
d8405328df
commit
fac4bf8060
28
etc/rc.d/ppp
28
etc/rc.d/ppp
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: ppp,v 1.4 2000/08/02 11:07:51 hubertf Exp $
|
||||
# $NetBSD: ppp,v 1.5 2001/02/11 00:51:35 fredb Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ppp
|
||||
|
@ -14,7 +14,11 @@
|
|||
|
||||
name="ppp"
|
||||
start_cmd="ppp_start"
|
||||
stop_cmd=":"
|
||||
stop_cmd="ppp_stop"
|
||||
sig_stop="-INT"
|
||||
sig_hup="-HUP"
|
||||
hup_cmd="ppp_hup"
|
||||
extra_commands="hup"
|
||||
|
||||
ppp_start()
|
||||
{
|
||||
|
@ -38,5 +42,25 @@ ppp_start()
|
|||
fi
|
||||
}
|
||||
|
||||
ppp_hup()
|
||||
{
|
||||
pids="`check_process pppd`"
|
||||
if [ -n "$pids" ]; then
|
||||
for pid in $pids; do
|
||||
kill $sig_hup $pid
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
ppp_stop()
|
||||
{
|
||||
pids="`check_process pppd`"
|
||||
if [ -n "$pids" ]; then
|
||||
for pid in $pids; do
|
||||
kill $sig_stop $pid
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
|
Loading…
Reference in New Issue