diff options
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/diskcheckd/Makefile | 36 | ||||
-rw-r--r-- | sysutils/diskcheckd/files/diskcheckd.sh | 20 | ||||
-rw-r--r-- | sysutils/diskcheckd/pkg-comment | 1 | ||||
-rw-r--r-- | sysutils/diskcheckd/pkg-descr | 4 | ||||
-rw-r--r-- | sysutils/diskcheckd/pkg-plist | 5 |
6 files changed, 67 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 355038992658..ad1fdffd2e4d 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -38,6 +38,7 @@ SUBDIR += detach SUBDIR += dim SUBDIR += dirdiff + SUBDIR += diskcheckd SUBDIR += diskusage SUBDIR += doconfig SUBDIR += du2ps diff --git a/sysutils/diskcheckd/Makefile b/sysutils/diskcheckd/Makefile new file mode 100644 index 000000000000..942df34b0d15 --- /dev/null +++ b/sysutils/diskcheckd/Makefile @@ -0,0 +1,36 @@ +# ex:ts=8 +# Ports collection makefile for: diskcheckd +# Date created: Thu Aug 23, 2001 +# Whom: David W. Chapman Jr. (dwcjr@FreeBSD.org) +# +# $FreeBSD$ +# + +PORTNAME= diskcheckd +PORTVERSION= 20010823 +CATEGORIES= sysutils +MASTER_SITES= # part of port +DISTFILES= # part of port +EXTRACT_ONLY= # part of port + +MAINTAINER= ports@FreeBSD.org + +STARTUP= diskcheckd.sh +MAN8= diskcheckd.8 + +NO_WRKSUBDIR= yes + +do-extract: + @${MKDIR} ${WRKSRC} + @(cd ${FILESDIR} && pax -r -w * ${WRKSRC}) + +do-build: + cd ${WRKSRC} && ${CC} ${CFLAGS} -DCONFPATH=\"${PREFIX}/etc\" -o diskcheckd diskcheckd.c + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/diskcheckd ${PREFIX}/sbin + ${INSTALL_DATA} ${WRKSRC}/diskcheckd.conf ${PREFIX}/etc/diskcheckd.conf.sample + ${INSTALL_SCRIPT} ${WRKSRC}/diskcheckd.sh ${PREFIX}/etc/rc.d + ${INSTALL_MAN} ${WRKSRC}/diskcheckd.8 ${PREFIX}/man/man8 + +.include <bsd.port.mk> diff --git a/sysutils/diskcheckd/files/diskcheckd.sh b/sysutils/diskcheckd/files/diskcheckd.sh new file mode 100644 index 000000000000..7459f8215c22 --- /dev/null +++ b/sysutils/diskcheckd/files/diskcheckd.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in + start) + [ -x ${PREFIX}/sbin/diskcheckd ] && ${PREFIX}/sbin/diskcheckd + ;; + stop) + /usr/bin/killall diskcheckd + ;; + *) + echo "" + echo "Usage: `basename $0` { start | stop }" + echo "" + ;; +esac diff --git a/sysutils/diskcheckd/pkg-comment b/sysutils/diskcheckd/pkg-comment new file mode 100644 index 000000000000..b74931405f00 --- /dev/null +++ b/sysutils/diskcheckd/pkg-comment @@ -0,0 +1 @@ +Daemon to check for disk read errors diff --git a/sysutils/diskcheckd/pkg-descr b/sysutils/diskcheckd/pkg-descr new file mode 100644 index 000000000000..7f2243c647d0 --- /dev/null +++ b/sysutils/diskcheckd/pkg-descr @@ -0,0 +1,4 @@ +diskcheckd is a daemon which runs in the background, reading entire disks +to find any read errors on those disks. The disks which should be +scanned, and the rates at which they should be scanned, must be specified +in the configuration file. diff --git a/sysutils/diskcheckd/pkg-plist b/sysutils/diskcheckd/pkg-plist new file mode 100644 index 000000000000..9aeb1e7697d2 --- /dev/null +++ b/sysutils/diskcheckd/pkg-plist @@ -0,0 +1,5 @@ +sbin/diskcheckd +etc/rc.d/diskcheckd.sh +@unexec if cmp -s %D/etc/diskcheckd.conf.sample %D/etc/diskcheckd.conf; then rm -f %D/etc/diskcheckd.conf; fi +etc/diskcheckd.conf.sample +@exec if [ ! -f %D/etc/diskcheckd.conf ]; then cp %D/etc/diskcheckd.conf.sample %D/etc/diskcheckd.conf; fi |