aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/etcmerge/src
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>2003-08-14 20:46:57 +0800
committereivind <eivind@FreeBSD.org>2003-08-14 20:46:57 +0800
commitcf73171f622e924de5446fec9113be4729654e08 (patch)
treef7a593f03aefe1ad5b5e1ff776431b86c2a96571 /sysutils/etcmerge/src
parentedc3361b557723ee59bc5d2842d6113c4218b1ed (diff)
downloadfreebsd-ports-gnome-cf73171f622e924de5446fec9113be4729654e08.tar.gz
freebsd-ports-gnome-cf73171f622e924de5446fec9113be4729654e08.tar.zst
freebsd-ports-gnome-cf73171f622e924de5446fec9113be4729654e08.zip
Update to 0.2:
Take care of regenerating .db files
Diffstat (limited to 'sysutils/etcmerge/src')
-rw-r--r--sysutils/etcmerge/src/etcmerge.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysutils/etcmerge/src/etcmerge.sh b/sysutils/etcmerge/src/etcmerge.sh
index d5d8d4edcbab..31ea1e5e7b7d 100644
--- a/sysutils/etcmerge/src/etcmerge.sh
+++ b/sysutils/etcmerge/src/etcmerge.sh
@@ -123,6 +123,14 @@ case "$1" in
exit 1
fi
done
+ # XXX Check for need?
+ /usr/sbin/pwd_mkdb -d etc-merged -p etc-merged/master.passwd
+ /usr/bin/cap_mkdb etc-merged/login.conf
+ if diff -q /etc/mail/aliases etc-merged/mail/aliases > /dev/null
+ NEED_NEWALIASES=yes
+ else
+ NEED_NEWALIASES=no
+ fi
tmpetc=/etc.$(date +%Y%m%d)
# XXX The entire set of operations below should be transactional.
# This could be achieved by doing the updates as a series of
@@ -146,6 +154,9 @@ case "$1" in
mv /etc/ /etc.etcmergeold
mv ${tmpetc} /etc
fsync /
+ if [ "${NEED_NEWALIASES}" = "yes" ]; then
+ /usr/sbin/newaliases
+ fi
mv ${REFETC} ${REFETC}.etcmergeold
mv ${REFETC}.etcmerge ${REFETC}
fsync /var/db