summaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-08-06 02:24:01 +0000
committerdelphij <delphij@FreeBSD.org>2007-08-06 02:24:01 +0000
commite389043f2c521708a4692cc57bc8217e4ed1d139 (patch)
tree1933bdbfcc7c173f26ca513d35c82fe645ccc39c /sysutils
parent4ce223c888acc6069eb93b334c011493486de006 (diff)
downloadFreeBSD-ports-e389043f2c521708a4692cc57bc8217e4ed1d139.zip
FreeBSD-ports-e389043f2c521708a4692cc57bc8217e4ed1d139.tar.gz
- Avoid clobbering existing 3dm2.conf
- Don't unconditionally set mode 600 on 3dm2.conf Noticed by: Craig Leres <leres ee lbl gov> Submitted by: maintainer (in a follup to the PR) PR: ports/114994
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/3dm/Makefile10
-rw-r--r--sysutils/3dm/pkg-plist4
2 files changed, 8 insertions, 6 deletions
diff --git a/sysutils/3dm/Makefile b/sysutils/3dm/Makefile
index 797c933..0fa7f24 100644
--- a/sysutils/3dm/Makefile
+++ b/sysutils/3dm/Makefile
@@ -7,6 +7,7 @@
PORTNAME= 3dm
PORTVERSION= 2.04.00.035
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= sysutils
MASTER_SITES= http://3ware.com/download/Escalade9650SE-Series/9.4.0.1/
@@ -96,10 +97,11 @@ do-install:
post-install:
${INSTALL_DATA} ${WRKSRC}/3dm2.conf.sample ${PREFIX}/etc/3dm2/
- [ -f ${PREFIX}/etc/3dm2/3dm2.conf ] || \
- ${CP} ${PREFIX}/etc/3dm2/3dm2.conf.sample \
- ${PREFIX}/etc/3dm2/3dm2.conf
- @${CHMOD} 600 ${PREFIX}/etc/3dm2/3dm2.conf.sample ${PREFIX}/etc/3dm2/3dm2.conf
+ ${CHMOD} 400 ${PREFIX}/etc/3dm2/3dm2.conf.sample
+ [ -f ${PREFIX}/etc/3dm2/3dm2.conf ] || ( \
+ ${INSTALL_DATA} ${WRKSRC}/3dm2.conf.sample ${PREFIX}/etc/3dm2/3dm2.conf && \
+ ${CHMOD} 600 ${PREFIX}/etc/3dm2/3dm2.conf \
+ )
# 3ware uses a hardcoded config dir location that doesn't match hier(9)
diff --git a/sysutils/3dm/pkg-plist b/sysutils/3dm/pkg-plist
index 8a453b1..956549c 100644
--- a/sysutils/3dm/pkg-plist
+++ b/sysutils/3dm/pkg-plist
@@ -1,7 +1,7 @@
-@unexec %D/etc/rc.d/3dm2.sh stop > /dev/null 2>&1 || true
+@unexec %D/etc/rc.d/3dm2 stop > /dev/null 2>&1 || true
@unexec if cmp -s %D/etc/3dm2/3dm2.conf.sample %D/etc/3dm2/3dm2.conf; then rm -f %D/etc/3dm2/3dm2.conf; fi
etc/3dm2/3dm2.conf.sample
-@exec if [ -f %B/3dm2.conf ] ; then cp -p %D/%F %B/3dm2.conf; fi
+@exec if [ ! -f %B/3dm2.conf ] ; then cp -p %D/%F %B/3dm2.conf && chmod 600 %B/3dm2.conf; fi
etc/3dm2/msg/tdm_msg_en
etc/3dm2/msg/tw_msg_en
sbin/3dm2
OpenPOWER on IntegriCloud