From uspoerlein@gmail.com  Sat Nov  4 15:18:18 2006
Return-Path: <uspoerlein@gmail.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 31DDA16A65A
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  4 Nov 2006 15:18:18 +0000 (UTC)
	(envelope-from uspoerlein@gmail.com)
Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C4AA643D53
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  4 Nov 2006 15:18:16 +0000 (GMT)
	(envelope-from uspoerlein@gmail.com)
Received: by ug-out-1314.google.com with SMTP id o2so537133uge
        for <FreeBSD-gnats-submit@freebsd.org>; Sat, 04 Nov 2006 07:18:15 -0800 (PST)
Received: by 10.67.121.15 with SMTP id y15mr4442862ugm.1162653495018;
        Sat, 04 Nov 2006 07:18:15 -0800 (PST)
Received: from roadrunner.q.local ( [85.180.171.182])
        by mx.google.com with ESMTP id q40sm2468116ugc.2006.11.04.07.18.14;
        Sat, 04 Nov 2006 07:18:14 -0800 (PST)
Received: from roadrunner.q.local (localhost [127.0.0.1])
	by roadrunner.q.local (8.13.8/8.13.8) with ESMTP id kA4F6Pup015821;
	Sat, 4 Nov 2006 16:06:25 +0100 (CET)
	(envelope-from q@roadrunner.q.local)
Received: (from q@localhost)
	by roadrunner.q.local (8.13.8/8.13.8/Submit) id kA4F6PSD015784;
	Sat, 4 Nov 2006 16:06:25 +0100 (CET)
	(envelope-from q)
Message-Id: <200611041506.kA4F6PSD015784@roadrunner.q.local>
Date: Sat, 4 Nov 2006 16:06:25 +0100 (CET)
From: Ulrich Spoerlein <uspoerlein@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] add redial function to rc.d/ppp
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         105145
>Category:       conf
>Synopsis:       [ppp] [patch] [request] add redial function to rc.d/ppp
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-rc
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 04 17:51:39 GMT 2006
>Closed-Date:    
>Last-Modified:  Wed Oct 31 20:50:00 UTC 2012
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:
>Description:
ppp(8) in auto or redial mode can be instructed to redial by
sending SIGINT to the process. I always forget, which signal it
is and have to look it up.

To short-circuit this, teach rc.d/ppp to issue the redial
>How-To-Repeat:
>Fix:

--- ppp.patch begins here ---
Index: ppp
===================================================================
RCS file: /home/ncvs/src/etc/rc.d/ppp,v
retrieving revision 1.12
diff -u -p -r1.12 ppp
--- ppp	26 Oct 2006 00:29:43 -0000	1.12
+++ ppp	4 Nov 2006 15:03:37 -0000
@@ -14,6 +14,8 @@ rcvar=`set_rcvar`
 command="/usr/sbin/${name}"
 start_precmd="ppp_precmd"
 start_postcmd="ppp_postcmd"
+redial_cmd="ppp_redial"
+extra_commands="redial"
 
 ppp_precmd()
 {
@@ -46,5 +48,23 @@ ppp_postcmd()
 	/etc/rc.d/pf resync
 }
 
+ppp_redial()
+{
+	# Only sent SIGINT when in auto or ddial mode. See ppp(8)
+	if [ "${ppp_mode}" = "ddial" -o "${ppp_mode}" = "auto" ]; then
+	  if [ -z "$rc_pid" ]; then
+	    if [ -n "$pidfile" ]; then
+	      echo 1>&2 "${name} not running? (check $pidfile)."
+	    else
+	      echo 1>&2 "${name} not running?"
+	    fi
+	    return 1
+	  fi
+
+	  kill -SIGINT $rc_pid
+	fi
+
+}
+
 load_rc_config $name
 run_rc_command "$1"
--- ppp.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Nov 4 19:02:20 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=105145 
State-Changed-From-To: open->feedback 
State-Changed-By: crees 
State-Changed-When: Wed Oct 31 19:03:58 UTC 2012 
State-Changed-Why:  
Hi Ulrich, I think you should commit this in a couple of weeks if no-one 
has objected; I've cleaned it up a bit and made it fit with the rest of 
the file, so please test it first! 
http://www.bayofrum.net/~crees/patches/105145.diff 

http://www.freebsd.org/cgi/query-pr.cgi?pr=105145 

From: Chris Rees <utisoft@gmail.com>
To: "bug-followup@freebsd.org" <bug-followup@freebsd.org>
Cc:  
Subject: Re: ports/105145
Date: Wed, 31 Oct 2012 20:48:22 +0000

 Incorporated feedback from jilles@ (thanks!)
 http://www.bayofrum.net/~crees/patches/105145-1.diff
>Unformatted:
