ifwatchd(8): remove lingering references to dhclient(8). In this case,

its replacement handles carrier detection itself. Addresses part of
PR misc/53669.
This commit is contained in:
gutteridge 2019-02-17 20:50:25 +00:00
parent 03f48fcb5b
commit 38c10b539d
1 changed files with 2 additions and 29 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: ifwatchd.8,v 1.28 2018/09/23 07:24:20 maxv Exp $
.\" $NetBSD: ifwatchd.8,v 1.29 2019/02/17 20:50:25 gutteridge Exp $
.\"
.\" Copyright (c) 2001-2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd September 22, 2018
.Dd February 17, 2019
.Dt IFWATCHD 8
.Os
.Sh NAME
@ -163,33 +163,6 @@ Use
in your
.Pa /etc/ifconfig.pppoe0
file in the on-demand case.
.Pp
The next example is for dhclient users.
.Bd -literal -offset indent
# ifwatchd -i -c /etc/dhcp/carrier-detect tlp0
.Ed
.Pp
With the above command, the carrier-detect script will be invoked when
a carrier is detected on the interface
.Ar tlp0 .
Note that the
.Fl i
flag prevents any action based on the initial state.
A script like the following should work for most users, although it
will not work for machines with multiple interfaces running
.Cm dhclient .
.Bd -literal -offset indent
#! /bin/sh
# Arguments: ifname tty speed address destination
# If there is a dhclient already running, kill it.
# (This step could be put in a distinct no-carrier script,
# if desired.)
if [ -f /var/run/dhclient.pid ]; then
/bin/kill `/bin/cat /var/run/dhclient.pid`
fi
# Start dhclient again on this interface
/sbin/dhclient $1
.Ed
.Sh PARAMETERS PASSED TO SCRIPTS
The invoked scripts get passed these parameters:
.Bl -tag -width destination