aboutsummaryrefslogtreecommitdiff
path: root/sysutils/apcupsd
diff options
context:
space:
mode:
authorLars Koeller <lkoeller@FreeBSD.org>2004-10-28 19:21:50 +0000
committerLars Koeller <lkoeller@FreeBSD.org>2004-10-28 19:21:50 +0000
commitbfb7c8bb560d6fff1c620683f0921612143464c0 (patch)
treebb8f975c8aacd28a5beb5441736e850cdc5506eb /sysutils/apcupsd
parent96e224570458896f04563eea4ba0baa644362bc9 (diff)
downloadports-bfb7c8bb560d6fff1c620683f0921612143464c0.tar.gz
ports-bfb7c8bb560d6fff1c620683f0921612143464c0.zip
Notes
Diffstat (limited to 'sysutils/apcupsd')
-rw-r--r--sysutils/apcupsd/Makefile12
-rw-r--r--sysutils/apcupsd/pkg-plist4
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