this is because $tmp.source_dir is not an empty dir.
This change recursively deletes everything in $tmp.source_dir.
Not required for $tmp.loop as it is used as a loopback mountpoint.
the ignore external MKFS_OPTIONS change is no longer required,
as _scratch_mkfs_xfs now handles conflicting options.
Merge of master-melb:xfs-cmds:28863a by kenmcd.
cleanup tmp and don't kill mkfs options
umount $SCRATCH_MNT 2>/dev/null
umount $tmp.loop 2>/dev/null
[ -d $tmp.loop ] && rmdir $tmp.loop
- [ -d $tmp.source_dir ] && rmdir $tmp.source_dir
+ [ -d $tmp.source_dir ] && rm -rf $tmp.source_dir
rm -f $tmp.* /var/tmp/xfs_copy.log.*
}
trap "_cleanup; exit \$status" 0 1 2 3 15
_require_scratch
_require_loop
-MKFS_OPTIONS="" #ignore external MKFS_OPTIONS
_scratch_mkfs_xfs -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
_scratch_mount 2>/dev/null || _fail "initial scratch mount failed"