summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2014-07-30 16:54:10 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2014-07-30 16:54:10 +0000
commit828e5c386247d03163b8dced94e35bb4d8690293 (patch)
treed2658b086d35620604ae31df3ddaff13b35be1f6 /usr.sbin
parentac560a04fa844d747e4337610dc06e9083fcce8c (diff)
Properly warn when an example changes and the corresponding file is found
under /etc. issue reported by Nathanael Rensen "fine" deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sysmerge/sysmerge.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh
index 627b361f0e4..6c3d253aa9f 100644
--- a/usr.sbin/sysmerge/sysmerge.sh
+++ b/usr.sbin/sysmerge/sysmerge.sh
@@ -1,6 +1,6 @@
#!/bin/ksh -
#
-# $OpenBSD: sysmerge.sh,v 1.143 2014/07/20 08:19:59 ajacoutot Exp $
+# $OpenBSD: sysmerge.sh,v 1.144 2014/07/30 16:54:09 ajacoutot Exp $
#
# Copyright (c) 2008-2014 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 1998-2003 Douglas Barton <DougB@FreeBSD.org>
@@ -632,7 +632,7 @@ sm_check_an_eg() {
EGSUM=examplessum
local _egmods _i _managed
if [ -f "${DESTDIR}/${DBDIR}/${EGSUM}" ]; then
- EGMODS="$(sha256 -c ${DESTDIR}/${DBDIR}/${EGSUM} 2>/dev/null | grep 'FAILED$' | awk '{ print $2 }' | sed -e "s,:,,")"
+ EGMODS="$(cd ${DESTDIR:=/} && sha256 -c ${DESTDIR}/${DBDIR}/${EGSUM} 2>/dev/null | grep 'FAILED$' | awk '{ print $2 }' | sed -e "s,:,,")"
mv ${DESTDIR}/${DBDIR}/${EGSUM} ${DESTDIR}/${DBDIR}/.${EGSUM}.bak
fi
for _i in ${EGMODS}; do