From ef0a3488aef5de9913728250b246bd456b724f5f Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 19 Aug 2012 15:21:51 -0400 Subject: [PATCH] Minor fixups to disco-fs-diff --- client/bin/disco-fs-diff | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/bin/disco-fs-diff b/client/bin/disco-fs-diff index f596400..68d3fcb 100755 --- a/client/bin/disco-fs-diff +++ b/client/bin/disco-fs-diff @@ -18,14 +18,14 @@ MODIFIED=0 rsync --checksum --times --perms --owner --group -ani ./scratchfs/ ./rootfs/ --out-format "info: File: %i : %f : mode='%B', size='%l', mtime='%M'" |\ sed -e s/"scratchfs"/""/ \ -e s/"\.unionfs\/"/""/ \ - -e s/"info: File: >f+++++++++ : \(\/.*\)_HIDDEN~ : mode="/"info: File: *_deleted__ : \1 : mode="/|\ + -e s/"info: File: .* : \(\/.*\)_HIDDEN~ : mode="/"info: File: *_deleted__ : \1 : mode="/|\ while read LINE do FNAME=$(echo $LINE | cut -d : -f 4 | sed s/"^ *"/""/ | sed s/" *$"/""/) MD5_NEW=$(md5sum ${DISCOROOT}/scratchfs${FNAME} 2>/dev/null| cut -d " " -f 1) STAT_NEW=$(stat --format "owner='%G:%U', selinux='%C', md5='${MD5_NEW}'" ${DISCOROOT}/scratchfs/${FNAME} 2>/dev/null) - if [ ! -d /${FNAME} ] && [ ! -d ${DISCOROOT}/scratchfs/${FNAME} ]; then - diff -N /${FNAME} ${DISCOROOT}/scratchfs/${FNAME} 2>/dev/null > /tmp/$$.diff + if [ ! -d ${FNAME} ] && [ ! -d ${DISCOROOT}/scratchfs${FNAME} ]; then + diff -N ${FNAME} ${DISCOROOT}/scratchfs${FNAME} 2>/dev/null > /tmp/$$.diff fi echo "${LINE}, ${STAT_NEW}" if [ -f /tmp/$$.diff ]; then