ports/65452: new port: sysutils/i8xxwd (Intel i8xx TCO Watchdog Timer)

Denis Shaposhnikov dsh at vlink.ru
Mon Apr 12 08:00:42 UTC 2004


>Number:         65452
>Category:       ports
>Synopsis:       new port: sysutils/i8xxwd (Intel i8xx TCO Watchdog Timer)
>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:   Mon Apr 12 01:00:41 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Denis Shaposhnikov
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD neva.vlink.ru 4.9-STABLE FreeBSD 4.9-STABLE #2: Wed Mar 3 14:17:03 MSK 2004 dsh at neva.vlink.ru:/var/FreeBSD/src/sys/compile/NEVA i386

>Description:

The i8xxwd kernel module is a driver for the Intel i8xx TCO watchdog
timer.  This timer is found in all Intel i8xx chipsets (although, some
motherboard manufacturers have seen fit to disable it). This driver
should work on most current versions of FreeBSD.

WWW: http://freebsd.tamu.edu/wdog/

>How-To-Repeat:

# 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:
#
#	i8xxwd/
#	i8xxwd/Makefile
#	i8xxwd/distinfo
#	i8xxwd/pkg-descr
#	i8xxwd/files
#	i8xxwd/files/i8xxwd.sh.sample
#	i8xxwd/files/patch-daemon-watchdogd.c
#	i8xxwd/pkg-deinstall
#	i8xxwd/pkg-plist
#
echo c - i8xxwd/
mkdir -p i8xxwd/ > /dev/null 2>&1
echo x - i8xxwd/Makefile
sed 's/^X//' >i8xxwd/Makefile << 'END-of-i8xxwd/Makefile'
X# New ports collection makefile for:	i8xxwd
X# Date created:		Fri Apr  9 14:47:42 MSD 2004
X# Whom:			Denis Shaposhnikov <dsh at vlink.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	i8xxwd
XPORTVERSION=	1.0
XCATEGORIES=	sysutils
XMASTER_SITES=	http://freebsd.tamu.edu/wdog/
XDISTFILES=	${PORTNAME}-stable${EXTRACT_SUFX} \
X		${PORTNAME}-current${EXTRACT_SUFX}
X
XMAINTAINER=	dsh at vlink.ru
XCOMMENT=	"Intel i8xx TCO Watchdog Timer"
X
XWRKSRC=		${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}
XCONFLICTS=	${PORTNAME}-*
X
X.if !defined(NOPORTDOCS)
XPORTDOCS=	README
X.endif
X
Xpre-build:
X	@if [ ! -d /sys -o ! -d /usr/src/sys ]; then \
X		${ECHO} "****************************************" ; \
X		${ECHO} " You need to extract kernel source tree" ; \
X		${ECHO} " before you build this package..." ; \
X		${ECHO} "****************************************" ; \
X		${FALSE} ; \
X	fi
X
Xdo-build:
X.for i in daemon module
X	@(cd ${BUILD_WRKSRC}/${i}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
X.endfor
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/daemon/watchdogd \
X		${PREFIX}/sbin/${PORTNAME}
X	${INSTALL_PROGRAM} ${WRKSRC}/module/${PORTNAME}.ko ${PREFIX}/lib/
X
X	${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.sh.sample ${PREFIX}/etc/rc.d/
X	@[ -f ${PREFIX}/etc/rc.d/${PORTNAME}.sh ] || \
X		${INSTALL_SCRIPT} ${FILESDIR}/${PORTNAME}.sh.sample \
X			${PREFIX}/etc/rc.d/${PORTNAME}.sh
X
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X.for i in ${PORTDOCS}
X	${INSTALL_MAN} ${WRKSRC}/${i} ${DOCSDIR}
X.endfor
X.endif
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 500000
XPKGNAMESUFFIX=	-stable
X.else
XPKGNAMESUFFIX=	-current
X.endif
X
X.include <bsd.port.post.mk>
END-of-i8xxwd/Makefile
echo x - i8xxwd/distinfo
sed 's/^X//' >i8xxwd/distinfo << 'END-of-i8xxwd/distinfo'
XMD5 (i8xxwd-stable.tar.gz) = a4eb88baf1ffa2535d3b86dfe6f788e2
XSIZE (i8xxwd-stable.tar.gz) = 5251
XMD5 (i8xxwd-current.tar.gz) = ccfc5de5e45c37d2cfb1b9080c61bcaa
XSIZE (i8xxwd-current.tar.gz) = 3536
END-of-i8xxwd/distinfo
echo x - i8xxwd/pkg-descr
sed 's/^X//' >i8xxwd/pkg-descr << 'END-of-i8xxwd/pkg-descr'
XThe i8xxwd kernel module is a driver for the Intel i8xx TCO watchdog
Xtimer.  This timer is found in all Intel i8xx chipsets (although, some
Xmotherboard manufacturers have seen fit to disable it). This driver
Xshould work on most current versions of FreeBSD.
X
XWWW: http://freebsd.tamu.edu/wdog/
END-of-i8xxwd/pkg-descr
echo c - i8xxwd/files
mkdir -p i8xxwd/files > /dev/null 2>&1
echo x - i8xxwd/files/i8xxwd.sh.sample
sed 's/^X//' >i8xxwd/files/i8xxwd.sh.sample << 'END-of-i8xxwd/files/i8xxwd.sh.sample'
X#! /bin/sh
X
Xcase $1 in
X    start)
X	[ -c /dev/watchdog ] || /sbin/mknod /dev/watchdog c 20 0
X	/sbin/kldload /usr/local/lib/i8xxwd.ko &&
X	    /usr/local/sbin/i8xxwd 30 && echo -n ' i8xxwd'
X	;;
X    stop)
X	[ -f /var/run/i8xxwd.pid ] && kill `cat /var/run/i8xxwd.pid` &&
X	    echo -n ' i8xxwd'
X	;;
X    *)
X	echo "Usage: `basename $0` {start|stop}" >&2
Xesac
X
Xexit 0
END-of-i8xxwd/files/i8xxwd.sh.sample
echo x - i8xxwd/files/patch-daemon-watchdogd.c
sed 's/^X//' >i8xxwd/files/patch-daemon-watchdogd.c << 'END-of-i8xxwd/files/patch-daemon-watchdogd.c'
X--- daemon/watchdogd.c.orig	Thu Mar 25 00:17:17 2004
X+++ daemon/watchdogd.c	Fri Apr  9 17:44:54 2004
X@@ -36,7 +36,7 @@
X #include <sys/ioccom.h>
X #include "../i8xxwd.h"
X  
X-#define PIDFILE "/var/run/watchdog.pid"
X+#define PIDFILE "/var/run/i8xxwd.pid"
X  
X static void term_handler(int);
X static int fd = 0;
X@@ -59,7 +59,7 @@
X   int sleep_time;
X   char str[10], *tmp;
X  
X-  openlog("watchdogd", LOG_PID | LOG_PERROR, LOG_DAEMON);             
X+  openlog("i8xxwd", LOG_PID | LOG_PERROR, LOG_DAEMON);             
X  
X   if (argc != 2) {
X     syslog(LOG_ERR,"Usage: watchdogd timeout");
X@@ -82,7 +82,7 @@
X     syslog(LOG_WARNING, "Call to daemon failed.");
X  
X   closelog();
X-  openlog("watchdogd", LOG_PID | LOG_CONS, LOG_DAEMON);
X+  openlog("i8xxwd", LOG_PID | LOG_CONS, LOG_DAEMON);
X  
X   if (signal(SIGTERM, sigterm_handler) < 0)
X     syslog(LOG_WARNING,"Unable to set handler for SIGTERM.");
END-of-i8xxwd/files/patch-daemon-watchdogd.c
echo x - i8xxwd/pkg-deinstall
sed 's/^X//' >i8xxwd/pkg-deinstall << 'END-of-i8xxwd/pkg-deinstall'
X#!/bin/sh
X
Xif [ "$2" != "POST-DEINSTALL" ]; then
X    exit 0
Xfi
X
Xcat <<EOF
X
XPleasekill i8xxwd, kldunload i8xxwd.ko, and remove /dev/watchdog if
Xyou want to remove this package forever.
X
XEOF
END-of-i8xxwd/pkg-deinstall
echo x - i8xxwd/pkg-plist
sed 's/^X//' >i8xxwd/pkg-plist << 'END-of-i8xxwd/pkg-plist'
Xlib/i8xxwd.ko
Xsbin/i8xxwd
X at unexec cmp -s %D/etc/rc.d/i8xxwd.sh %D/etc/rc.d/i8xxwd.sh.sample && rm -f %D/etc/rc.d/i8xxwd.sh
Xetc/rc.d/i8xxwd.sh.sample
X at exec [ -f %B/i8xxwd.sh ] || ( cp %B/%f %B/i8xxwd.sh; chmod 755 %B/i8xxwd.sh )
END-of-i8xxwd/pkg-plist
exit

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list