diff options
author | lkoeller <lkoeller@FreeBSD.org> | 2004-10-29 03:21:50 +0800 |
---|---|---|
committer | lkoeller <lkoeller@FreeBSD.org> | 2004-10-29 03:21:50 +0800 |
commit | 4f7ff0404be451939f8d2e28403630294840c346 (patch) | |
tree | 5461a77eb75f24bf833a3852e9031760e2788c94 /sysutils | |
parent | 9e21b43396d48d3940670c9696ee24d979ea9e81 (diff) | |
download | freebsd-ports-gnome-4f7ff0404be451939f8d2e28403630294840c346.tar.gz freebsd-ports-gnome-4f7ff0404be451939f8d2e28403630294840c346.tar.zst freebsd-ports-gnome-4f7ff0404be451939f8d2e28403630294840c346.zip |
o) Fix some pkg-plist errors
o) Handle new config file correctly
PR: -
Submitted by: Neil Darlow <neil@darlow.co.uk>
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/apcupsd/Makefile | 12 | ||||
-rw-r--r-- | sysutils/apcupsd/pkg-plist | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile index e8cbd0fcddd7..a561b0ea7d96 100644 --- a/sysutils/apcupsd/Makefile +++ b/sysutils/apcupsd/Makefile @@ -7,7 +7,7 @@ PORTNAME= apcupsd PORTVERSION= 3.10.15 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -100,6 +100,16 @@ post-install: ${INSTALL_SCRIPT} ${FILESDIR}/${STARTUP_SCRIPT} ${PREFIX}/etc/rc.d/${STARTUP_SCRIPT} ${INSTALL_DATA} ${FILESDIR}/apcupsd.conf.net-master.sample ${PREFIX}/etc/apcupsd/ ${INSTALL_DATA} ${FILESDIR}/apcupsd.conf.net-slave.sample ${PREFIX}/etc/apcupsd/ + # If there is already an config file it is installed as ...new + for na in apcupsd.conf apcupsd.css; do \ + if [ -f ${PREFIX}/etc/apcupsd/$$na ]; then \ + if [ -f ${PREFIX}/etc/apcupsd/$$na.new ]; then \ + ${MV} ${PREFIX}/etc/apcupsd/$$na.new ${PREFIX}/etc/apcupsd/$$na.sample; \ + else \ + ${CP} ${PREFIX}/etc/apcupsd/$$na ${PREFIX}/etc/apcupsd/$$na.sample; \ + fi; \ + fi; \ + done .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} diff --git a/sysutils/apcupsd/pkg-plist b/sysutils/apcupsd/pkg-plist index 9f6a5957aae5..d58e5c3149d6 100644 --- a/sysutils/apcupsd/pkg-plist +++ b/sysutils/apcupsd/pkg-plist @@ -5,6 +5,7 @@ sbin/apctest %%POWERFL%%sbin/powerflute etc/apcupsd/apcupsd.conf.net-master.sample etc/apcupsd/apcupsd.conf.net-slave.sample +etc/apcupsd/apcupsd.conf.sample etc/apcupsd/apccontrol etc/apcupsd/changeme etc/apcupsd/commfailure @@ -13,8 +14,7 @@ etc/apcupsd/mainsback etc/apcupsd/masterconnect etc/apcupsd/mastertimeout etc/apcupsd/onbattery -etc/apcupsd/apcupsd.conf.sample -%%CGI%%etc/apcupsd/cgi/apcupsd.css.sample +%%CGI%%etc/apcupsd/apcupsd.css.sample %%CGI%%etc/apcupsd/cgi/multimon.cgi %%CGI%%etc/apcupsd/cgi/upsfstats.cgi %%CGI%%etc/apcupsd/cgi/upsimage.cgi |