_require_scratch
echo "Silence is golden."
-for fs in `echo /sbin/mkfs.* | sed -e 's/.sbin.mkfs.//g'`
+for fs in `echo ${MKFS_PROG}.* | sed -e 's/.sbin.mkfs.//g'`
do
preop="" # for special input needs
preargs="" # for any special pre-device options
if [ $? -eq 0 ] ; then
# next, ensure we don't overwrite it
echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
- /sbin/mkfs.xfs $SCRATCH_DEV >>$seq.full 2>&1
+ ${MKFS_PROG}.xfs $SCRATCH_DEV >>$seq.full 2>&1
[ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
else
|| _fail "!!! failed to mount"
_log "Create xfs fs in file on scratch"
-/sbin/mkfs.xfs -f -dfile,name=$SCRATCH_MNT/test.xfs,size=40m \
+${MKFS_PROG}.xfs -f -dfile,name=$SCRATCH_MNT/test.xfs,size=40m \
>> $seq.full 2>&1 \
|| _fail "!!! failed to mkfs xfs"
echo
echo === copying scratch device to single target, large ro device
-/sbin/mkfs.xfs -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
+${MKFS_PROG}.xfs -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
rmdir $imgs.source_dir 2>/dev/null
mkdir $imgs.source_dir
$MKFS_BTRFS_PROG $MKFS_OPTIONS $* $SCRATCH_DEV > /dev/null
;;
*)
- /sbin/mkfs -t $FSTYP -- $MKFS_OPTIONS $* $SCRATCH_DEV
+ yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $* $SCRATCH_DEV
;;
esac
}
_scratch_mkfs_xfs -d size=$fssize -b size=$blocksize
;;
ext2|ext3|ext4|ext4dev)
- /sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
+ yes | ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
;;
btrfs)
$MKFS_BTRFS_PROG $MKFS_OPTIONS -b $fssize $SCRATCH_DEV