From dpelleg+@cs.cmu.edu  Sat May 24 04:16:32 2003
Return-Path: <dpelleg+@cs.cmu.edu>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AA4B937B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 24 May 2003 04:16:31 -0700 (PDT)
Received: from gw.pelleg.org (gw.pelleg.org [205.201.13.235])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A096D43FA3
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 24 May 2003 04:16:28 -0700 (PDT)
	(envelope-from dpelleg+@cs.cmu.edu)
Received: from palraz.wburn (palraz [192.168.1.1])
	by gw.pelleg.org (Postfix) with ESMTP id D549C5A23
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 24 May 2003 07:16:26 -0400 (EDT)
Received: by palraz.wburn (Postfix, from userid 7675)
	id 19D0B562; Sat, 24 May 2003 07:16:26 -0400 (EDT)
Message-Id: <20030524111626.19D0B562@palraz.wburn>
Date: Sat, 24 May 2003 07:16:26 -0400 (EDT)
From: Dan Pelleg <daniel+nicmond@pelleg.org>
Reply-To: Dan Pelleg <daniel+nicmond@pelleg.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: New port: nicmond - Wait for a carrier signal on a NIC and launch a configuration script
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         52637
>Category:       ports
>Synopsis:       New port: nicmond - Wait for a carrier signal on a NIC and launch a configuration script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 24 04:20:19 PDT 2003
>Closed-Date:    Mon Jun 02 19:32:23 PDT 2003
>Last-Modified:  Mon Jun 02 19:32:23 PDT 2003
>Originator:     Dan Pelleg
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD l 4.8-RC FreeBSD 4.8-RC #8: Fri May  2 15:46:42 EDT 2003 d@p i386

	
>Description:

This program watches the link status of a network interface. When a
change of state is detected, a script is launched. This is useful
for machines that need to configure themselves whenever they are
plugged into or out of the network, such as laptops.

>How-To-Repeat:
	
>Fix:

	


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	nicmond/
#	nicmond/Makefile
#	nicmond/distinfo
#	nicmond/pkg-descr
#	nicmond/pkg-plist
#	nicmond/files
#	nicmond/files/patch-aa
#	nicmond/files/patch-ab
#	nicmond/pkg-message
#
echo c - nicmond/
mkdir -p nicmond/ > /dev/null 2>&1
echo x - nicmond/Makefile
sed 's/^X//' >nicmond/Makefile << 'END-of-nicmond/Makefile'
X# New ports collection makefile for:    nicmond
X# Date created:		2003/05/23
X# Whom:			Dan Pelleg <daniel+nicmond@pelleg.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	nicmond
XPORTVERSION=	1.1
XCATEGORIES=	net
XMASTER_SITES=	http://www.agt.ne.jp/~a-gota/programs/nicmond/ \
X		http://web.cs.cmu.edu/~dpelleg/download/
XMASTER_SITE_SUBDIR=	${PORTNAME}
X
XPATCH_SITES=	http://web.cs.cmu.edu/~dpelleg/download/
XPATCHFILES=	nicmond-doc-en-1.1.diff
X
XMAINTAINER=	daniel+nicmond@pelleg.org
XCOMMENT=	Wait for a carrier signal on a NIC and launch a configuration script
X
XMANLANG=	ja
XMANCOMPRESSED=	yes
XMAN5=		nicmond.conf.5
XMAN8=		nicmond.8
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	cd ${WRKSRC} && \
X		${INSTALL_DATA} README README.en ${DOCSDIR}
X.endif
X
X.include <bsd.port.mk>
END-of-nicmond/Makefile
echo x - nicmond/distinfo
sed 's/^X//' >nicmond/distinfo << 'END-of-nicmond/distinfo'
XMD5 (nicmond-1.1.tar.gz) = 6254f5ede7ede0e1dc3fe6d3d0813ff9
XMD5 (nicmond-doc-en-1.1.diff) = 76680c7fbbb026ae54cf999eff519995
END-of-nicmond/distinfo
echo x - nicmond/pkg-descr
sed 's/^X//' >nicmond/pkg-descr << 'END-of-nicmond/pkg-descr'
XThis program watches the link status of a network interface. When a
Xchange of state is detected, a script is launched. This is useful
Xfor machines that need to configure themselves whenever they are
Xplugged into or out of the network, such as laptops.
X
X -- Dan Pelleg
Xdaniel+nicmond@pelleg.org
END-of-nicmond/pkg-descr
echo x - nicmond/pkg-plist
sed 's/^X//' >nicmond/pkg-plist << 'END-of-nicmond/pkg-plist'
Xsbin/nicmond
Xetc/nicmond.conf
Xetc/rc.d/nicmond.sh
Xlibexec/cleanup_inet6_route
X%%PORTDOCS%%share/doc/nicmond/README
X%%PORTDOCS%%share/doc/nicmond/README.en
X%%PORTDOCS%%@dirrm share/doc/nicmond
END-of-nicmond/pkg-plist
echo c - nicmond/files
mkdir -p nicmond/files > /dev/null 2>&1
echo x - nicmond/files/patch-aa
sed 's/^X//' >nicmond/files/patch-aa << 'END-of-nicmond/files/patch-aa'
X--- Makefile.org	Fri May 23 20:21:18 2003
X+++ Makefile		Fri May 23 20:21:34 2003
X@@ -1,6 +1,3 @@
X-CFLAGS=	-O2 -Wall
X-PREFIX=	/usr/local
X-
X all:	nicmond
X 
X nicmond: nicmond.c
END-of-nicmond/files/patch-aa
echo x - nicmond/files/patch-ab
sed 's/^X//' >nicmond/files/patch-ab << 'END-of-nicmond/files/patch-ab'
X--- nicmond.conf.orig	Fri May 23 22:01:51 2003
X+++ nicmond.conf	Fri May 23 22:02:43 2003
X@@ -6,10 +6,11 @@
X info		info
X 
X interface fxp0
X-	up	/etc/pccard_ether $device start
X-	up	/sbin/rtsol $device
X-	down	/etc/pccard_ether $device stop
X+#select and un-comment "up" and/or "down" actions as needed
X+#	up	/etc/pccard_ether $device start
X+#	up	/sbin/rtsol $device
X+#	down	/etc/pccard_ether $device stop
X #	down	/sbin/route delete $myaddr4 localhost
X-	down	/sbin/ifconfig $device inet6 $myaddr6 delete
X-	down	/usr/local/libexec/cleanup_inet6_route $device
X-	down	/sbin/ifconfig $device down
X+#	down	/sbin/ifconfig $device inet6 $myaddr6 delete
X+#	down	/usr/local/libexec/cleanup_inet6_route $device
X+#	down	/sbin/ifconfig $device down
END-of-nicmond/files/patch-ab
echo x - nicmond/pkg-message
sed 's/^X//' >nicmond/pkg-message << 'END-of-nicmond/pkg-message'
XTo configure nicmond, do the following:
X
X1. Edit ${PREFIX}/etc/rc.d/nicmond.sh and set "if" to the
Xname of the interface you want to monitor.
X
X2. Edit ${PREFIX}/etc/nicmond.conf and configure "up"
Xand "down" actions.
END-of-nicmond/pkg-message
exit

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: will 
State-Changed-When: Mon Jun 2 19:32:16 PDT 2003 
State-Changed-Why:  
Committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52637 
>Unformatted:
