diff options
author | brooks <brooks@FreeBSD.org> | 2013-11-26 16:13:48 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2013-11-26 16:13:48 +0000 |
commit | 4355776cd8cb93d5a5635fc739dcc3ecf5d1ccfd (patch) | |
tree | 6f97e8d0f6c843deacfc43d4c42f4526de0ba2f5 /usr.sbin | |
parent | c545463f87891b7cabcb279987652b0665a4135c (diff) | |
download | FreeBSD-src-4355776cd8cb93d5a5635fc739dcc3ecf5d1ccfd.zip FreeBSD-src-4355776cd8cb93d5a5635fc739dcc3ecf5d1ccfd.tar.gz |
MFC: r258456
Fix mergemaster -U by forcing FreeBSD 9 compatiblity in mtree when mtree is
nmtree.
The mtree output used by mergemaster in this case was clearly not meant for
computer consumption and an approach based on -f <file1> -f <file2> would
probably be a better idea, but this is a minimal change.
Approved by: re (glebius)
Diffstat (limited to 'usr.sbin')
-rwxr-xr-x | usr.sbin/mergemaster/mergemaster.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh index 361cef9..f3aafae 100755 --- a/usr.sbin/mergemaster/mergemaster.sh +++ b/usr.sbin/mergemaster/mergemaster.sh @@ -492,8 +492,14 @@ MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk" # files the user changed from the reference files. # if [ -n "${AUTO_UPGRADE}" -a -s "${MTREEFILE}" ]; then + # Force FreeBSD 9 compatible output when available. + if mtree -F freebsd9 -c -p /var/empty/ > /dev/null 2>&1; then + MTREE_FLAVOR="-F freebsd9" + else + MTREE_FLAVOR= + fi CHANGED=: - for file in `mtree -eqL -f ${MTREEFILE} -p ${DESTDIR}/ \ + for file in `mtree -eqL ${MTREE_FLAVOR} -f ${MTREEFILE} -p ${DESTDIR}/ \ 2>/dev/null | awk '($2 == "changed") {print $1}'`; do if [ -f "${DESTDIR}/$file" ]; then CHANGED="${CHANGED}${DESTDIR}/${file}:" |