ports/52637: New port: nicmond - Wait for a carrier signal on a NIC and launch a configuration script

Dan Pelleg daniel+nicmond at pelleg.org
Sat May 24 11:20:22 UTC 2003


>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 24 04:20:19 PDT 2003
>Closed-Date:
>Last-Modified:
>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 at 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 at 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 at 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 at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list