diff options
author | eivind <eivind@FreeBSD.org> | 2003-08-14 20:46:57 +0800 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 2003-08-14 20:46:57 +0800 |
commit | cf73171f622e924de5446fec9113be4729654e08 (patch) | |
tree | f7a593f03aefe1ad5b5e1ff776431b86c2a96571 /sysutils/etcmerge/src | |
parent | edc3361b557723ee59bc5d2842d6113c4218b1ed (diff) | |
download | freebsd-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.sh | 11 |
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 |