Permalink
Browse files

Fix warden.conf getting clobbered during package upgrade

  • Loading branch information...
1 parent 5ae7c8e commit 1aede146361ec0ef451848b5010677d8c541a02c @kmoore134 kmoore134 committed Feb 14, 2014
Showing with 9 additions and 20 deletions.
  1. +6 −0 src-sh/port-files/pkg-install
  2. +1 −1 src-sh/port-files/pkg-plist
  3. +2 −19 src-sh/warden/install.sh
@@ -37,4 +37,10 @@ if [ -e "${PREFIX}/share/pbi-manager/.pbime" ] ; then
install -o root -g wheel -m 755 ${PREFIX}/share/pbi-manager/.mount_nullfs /usr/pbi/.mount_nullfs
fi
+# Check if we have our warden.conf file
+if [ ! -e "/usr/local/etc/warden.conf" ] ; then
+ cp /usr/local/etc/warden.conf.dist /usr/local/etc/warden.conf
+ chmod 644 /usr/local/etc/warden.conf
+fi
+
exit 0
@@ -538,7 +538,7 @@ share/pcbsd/scripts/mkzfsdir.sh
share/pcbsd/scripts/reset-firewall
share/pcbsd/scripts/rmzfsdir.sh
share/pcbsd/scripts/sys-init.sh
-etc/warden.conf
+etc/warden.conf.dist
etc/pc-activedirectory.conf
etc/pc-ldap.conf
etc/rc.activedirectory
View
@@ -22,25 +22,8 @@ cd ${DIR}
cp bin/warden ${LB}/bin/warden
chmod 755 ${LB}/bin/warden
-# Save existing settings
-if [ -e "${LB}/etc/warden.conf" ] ; then
- NIC=`grep '^NIC:' ${LB}/etc/warden.conf | awk '{print $2}'`
- WTMP=`grep '^WTMP:' ${LB}/etc/warden.conf | awk '{print $2}'`
- JDIR=`grep '^JDIR:' ${LB}/etc/warden.conf | awk '{print $2}'`
- ONIC=`grep '^NIC:' conf/warden.conf`
- OWTMP=`grep '^WTMP:' conf/warden.conf`
- OJDIR=`grep '^JDIR:' conf/warden.conf`
-fi
-
-cp conf/warden.conf ${LB}/etc/warden.conf
-chmod 644 ${LB}/etc/warden.conf
-
-# Save the settings
-if [ -n "$NIC" ] ; then
- sed -i '' "s|$ONIC|NIC: $NIC|g" ${LB}/etc/warden.conf
- sed -i '' "s|$OWTMP|WTMP: $WTMP|g" ${LB}/etc/warden.conf
- sed -i '' "s|$OJDIR|JDIR: $JDIR|g" ${LB}/etc/warden.conf
-fi
+cp conf/warden.conf ${LB}/etc/warden.conf.dist
+chmod 644 ${LB}/etc/warden.conf.dist
if [ -d "${PROGDIR}/linux-installs" ] ; then
rm -rf ${PROGDIR}/linux-installs

0 comments on commit 1aede14

Please sign in to comment.