Subject: Re: Suggested patches for sysutils/ups-nut
To: None <tech-pkg@netbsd.org>
From: Julian Coleman <jdc@coris.demon.co.uk>
List: tech-pkg
Date: 10/14/2002 10:49:27
> cut/paste bug?

Indeed.

> why would you be excluding bash from newsyslog.conf? when appending
> /var/log/ups? 

See above.  Thanks.  

How about this instead?  BTW, why is there a `touch` in the Makefile but
not in the @exec, @unexec?

J

 ---8<---------------------------- Cut here ---------------------------->8---
--- Makefile.dist	Thu Oct  3 11:21:08 2002
+++ Makefile	Sun Oct 13 11:17:58 2002
@@ -68,6 +68,10 @@
 	${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${NUT_DOCDIR}
 	${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${NUT_DOCDIR}/cables
 	${INSTALL_DATA} ${WRKSRC}/docs/drivers/*.txt ${NUT_DOCDIR}/drivers
+	${TOUCH} /etc/newsyslog.conf
+	${CP} /etc/newsyslog.conf /etc/newsyslog.conf.bak
+	(${GREP} -v /var/log/ups /etc/newsyslog.conf.bak || ${TRUE}; ${ECHO} "/var/log/ups		root:wheel	644  7    100  *    Z     /var/run/upslog.pid") >/etc/newsyslog.conf
+	${RM} /etc/newsyslog.conf.bak
 
 .include "../../mk/bsd.pkg.install.mk"
 .include "../../mk/bsd.pkg.mk"
--- PLIST.dist	Tue Aug 27 11:15:57 2002
+++ PLIST	Sun Oct 13 10:51:02 2002
@@ -1,4 +1,6 @@
 @comment $NetBSD: PLIST,v 1.10 2002/08/25 21:51:04 jlam Exp $
+@exec echo "updating /etc/newsyslog.conf"; cp /etc/newsyslog.conf /etc/newsyslog.conf.bak; (grep -v /var/log/ups /etc/newsyslog.conf.bak || true; echo "/var/log/ups		root:wheel	644  7    100  *    Z     /var/run/upslog.pid") >/etc/newsyslog.conf
+@unexec echo "updating /etc/newsyslog.conf"; cp /etc/newsyslog.conf /etc/newsyslog.conf.bak; (grep -v /var/log/ups /etc/newsyslog.conf.bak || true) >/etc/newsyslog.conf
 bin/upsc
 bin/upscmd
 bin/upsct
 ---8<---------------------------- Cut here ---------------------------->8---

-- 
                    My other computer also runs NetBSD
                          http://www.netbsd.org/