From: Erez Zadok Date: Sat, 7 May 2022 22:24:37 +0000 (-0400) Subject: Comment updating. Allow overriding SCRATCH_DEV from the env. X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=6a3ecfd71fb5677db194cdd3f4f6820fe6e17821;p=wrapfs-mgmt.git Comment updating. Allow overriding SCRATCH_DEV from the env. --- diff --git a/tests/w-racer.sh b/tests/w-racer.sh index 2737281..caa00ea 100755 --- a/tests/w-racer.sh +++ b/tests/w-racer.sh @@ -2,9 +2,9 @@ # RACER tests ############################################################################## -# scratch device to mount on /n/scratch -#SCRATCH_DEV=/dev/hdd2 -SCRATCH_DEV=/dev/sdb +# Scratch device to mount on /n/scratch. +# Users can set $SCRATCH_DEV and export it, else we default to /dev/sdb +test -z "$SCRATCH_DEV" && SCRATCH_DEV=/dev/sdb function runcmd { @@ -45,7 +45,7 @@ case "$lowertype" in tmpfs ) runcmd umount /n/scratch runcmd swapoff $SCRATCH_DEV - ;; +v ;; nfs ) runcmd umount /n/scratch runcmd exportfs -u localhost:/n/lower @@ -77,12 +77,11 @@ then cleanup fi -# file system specific mkfs programs have a -q option for quiet but -# it doesn't prevent asking for confirmation when a filesystem already -# exists on the specified disk -# so we must feed in a y to proceed through this prompt -# I couldn't get yes(1) to play nicely with runcmd -# mkfs.ext4 also has a -F force option but this didn't work for me +# File system specific mkfs programs have a -q option for quiet but it +# doesn't prevent asking for confirmation when a filesystem already exists +# on the specified disk. So we must feed in a "y" to proceed through this +# prompt. We couldn't get yes(1) to play nicely with runcmd. mkfs.ext4 +# also has a -F force option but this didn't seem to work. case "$lowertype" in ext2 | ext3 | ext4 | reiserfs ) runcmd mkfs -t $lowertype -q $SCRATCH_DEV <<< y