gs201: convert_to_ext4: copy .files, fix md5sum
Copy files in persist/.* Don't leave md5sums file in the persist folder. Bug: 239632964 Signed-off-by: Andrew Chant <achant@google.com> Change-Id: I7d351806f95ccc28fcfec4d45ecf3bda488e7e15
This commit is contained in:
parent
83e0b84caf
commit
b108713200
1 changed files with 6 additions and 4 deletions
|
@ -109,6 +109,7 @@ while [[ $RETRIES -gt 0 ]]; do
|
|||
continue
|
||||
fi
|
||||
|
||||
cp -rp $MNT_OLD/.* $MNT_NEW/
|
||||
cp -rp $MNT_OLD/* $MNT_NEW/
|
||||
check_success "cp -rp $MNT_OLD/* $MNT_NEW/"
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -120,11 +121,12 @@ while [[ $RETRIES -gt 0 ]]; do
|
|||
fi
|
||||
|
||||
# Calculate md5sum of all files and compare between persist and efs
|
||||
(cd $MNT_NEW; find . -type f | xargs md5sum | sort) > $MNT_NEW/md5sums
|
||||
(cd $MNT_OLD; find . -type f | xargs md5sum | sort) > $MNT_OLD/md5sums
|
||||
diff -q $MNT_NEW/md5sums $MNT_OLD/md5sums
|
||||
check_success "diff -q $MNT_NEW/md5sums $MNT_OLD/md5sums"
|
||||
(cd $MNT_NEW; find . -type f | xargs md5sum | sort) > $MNT_BASE/new.md5sums
|
||||
(cd $MNT_OLD; find . -type f | xargs md5sum | sort) > $MNT_BASE/old.md5sums
|
||||
diff $MNT_BASE/new.md5sums $MNT_BASE/old.md5sums
|
||||
check_success "diff $MNT_BASE/new.md5sums $MNT_BASE/old.md5sums"
|
||||
RES=$?
|
||||
rm $MNT_BASE/new.md5sums $MNT_BASE/old.md5sums
|
||||
|
||||
umount $MNT_NEW
|
||||
umount $MNT_OLD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue