From owner-freebsd-ports@FreeBSD.ORG Tue Apr 20 09:08:46 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A61CF16A50E for ; Tue, 20 Apr 2004 09:08:45 -0700 (PDT) Received: from sakura.ninth-nine.com (sakura.ninth-nine.com [219.127.74.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9958F43D1F for ; Tue, 20 Apr 2004 09:08:44 -0700 (PDT) (envelope-from nork@FreeBSD.org) Received: from nadesico.ninth-nine.com (nadesico.ninth-nine.com [219.127.74.122]) by sakura.ninth-nine.com (8.12.11/8.12.11/NinthNine) with SMTP id i3KG8gPE015920; Wed, 21 Apr 2004 01:08:43 +0900 (JST) (envelope-from nork@FreeBSD.org) Date: Wed, 21 Apr 2004 01:08:42 +0900 (JST) Message-Id: <200404201608.i3KG8gPE015920@sakura.ninth-nine.com> From: Norikatsu Shigemura To: Eduard Martinescu X-Mailer: Sylpheed version 0.9.9-gtk2-20040229 (GTK+ 2.4.0; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: ports@FreeBSD.org Subject: rcNG-fy sysutils/smartmontools X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 16:08:47 -0000 Hi Eduard. I made a patch which rcNG-fy sysutils/smartmontools. Is this commit OK? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: Makefile =================================================================== RCS file: /home/ncvs/ports/sysutils/smartmontools/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- Makefile 9 Mar 2004 06:32:12 -0000 1.7 +++ Makefile 20 Apr 2004 15:50:56 -0000 @@ -7,7 +7,7 @@ PORTNAME= smartmontools PORTVERSION= 5.30 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -16,6 +16,7 @@ COMMENT= S.M.A.R.T. disk monitoring tools USE_GMAKE= yes +USE_RC_SUBR= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-initscriptdir=${PREFIX}/etc/rc.d \ --with-docdir=${DOCSDIR} --enable-sample @@ -26,14 +27,18 @@ MAN8= smartd.8 smartctl.8 DOCS= AUTHORS CHANGELOG INSTALL NEWS README TODO WARNINGS EXAMPLES= smartd.conf examplescripts/README examplescripts/Example? +RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} + +post-build: + ${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/smartd.sh > ${WRKDIR}/smartd.sh do-install: cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PROGRAMS} ${PREFIX}/sbin cd ${WRKSRC} && ${INSTALL_MAN} ${MAN5} ${MANPREFIX}/man/man5 cd ${WRKSRC} && ${INSTALL_MAN} ${MAN8} ${MANPREFIX}/man/man8 ${INSTALL_DATA} ${WRKSRC}/smartd.conf.sample ${PREFIX}/etc - ${INSTALL_DATA} ${WRKSRC}/smartd.initd \ - ${PREFIX}/etc/rc.d/smartd.sh.sample + ${INSTALL_SCRIPT} ${WRKDIR}/smartd.sh ${PREFIX}/etc/rc.d/smartd.sh @${MKDIR} ${EXAMPLESDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR} .if !defined(NOPORTDOCS) Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/sysutils/smartmontools/pkg-plist,v retrieving revision 1.1 diff -u -r1.1 pkg-plist --- pkg-plist 24 Oct 2003 07:45:38 -0000 1.1 +++ pkg-plist 20 Apr 2004 15:53:08 -0000 @@ -2,7 +2,7 @@ @unexec /bin/echo "===>" Stopping smartd ... @unexec /usr/bin/killall smartd 2>/dev/null || true etc/smartd.conf.sample -etc/rc.d/smartd.sh.sample +etc/rc.d/smartd.sh sbin/smartctl sbin/smartd %%PORTDOCS%%%%DOCSDIR%%/AUTHORS Index: files/smartd.sh =================================================================== RCS file: files/smartd.sh diff -N files/smartd.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/smartd.sh 20 Apr 2004 15:26:22 -0000 @@ -0,0 +1,28 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: smartd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown + +# Define these cyrus_imapd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/smartd +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +smartd_enable="${smartd_enable:-NO}" +smartd_flags="${smartd_flags:--p /var/run/smartd.pid}" + +. %%RC_SUBR%% + +name="smartd" +rcvar=`set_rcvar` +command="%%PREFIX%%/sbin/smartd" +pidfile="/var/run/smartd.pid" +required_files="%%PREFIX%%/etc/smartd.conf" + +load_rc_config $name +run_rc_command "$1" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -