Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/etc/rc.d Pull up revision 1.5 (requested by fredb):



details:   https://anonhg.NetBSD.org/src/rev/a0a689a6f191
branches:  netbsd-1-5
changeset: 490858:a0a689a6f191
user:      he <he%NetBSD.org@localhost>
date:      Tue Mar 13 20:55:05 2001 +0000

description:
Pull up revision 1.5 (requested by fredb):
  Add ``stop'' and ``hup'' commands.

diffstat:

 etc/rc.d/ppp |  28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

diffs (50 lines):

diff -r 3c17e86071c2 -r a0a689a6f191 etc/rc.d/ppp
--- a/etc/rc.d/ppp      Tue Mar 13 20:52:47 2001 +0000
+++ b/etc/rc.d/ppp      Tue Mar 13 20:55:05 2001 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ppp,v 1.2.4.1 2000/08/09 19:09:45 lukem Exp $
+# $NetBSD: ppp,v 1.2.4.2 2001/03/13 20:55:05 he 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 @@
        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"



Home | Main Index | Thread Index | Old Index