From: David Disseldorp Date: Fri, 13 Oct 2006 03:54:57 +0000 (+0000) Subject: irix is fussy about how it is fed its mount options X-Git-Tag: v1.1.0~569 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7cf9d615bd259ab959db0e67b6c2391239c3cb2b;p=xfstests-dev.git irix is fussy about how it is fed its mount options - multiple -o's are not allowed - no spaces between comma delimitered options added sed script replaces all -o's (except the first) with a comma Merge of master-melb:xfs-cmds:27184a by kenmcd. --- diff --git a/common.rc b/common.rc index 6be40f6d..ab8f6416 100644 --- a/common.rc +++ b/common.rc @@ -147,10 +147,21 @@ _test_options() TEST_OPTIONS="$TEST_OPTIONS ${log_opt}logdev=$TEST_LOGDEV" } +_mount_ops_minus_o_comma_replace() +{ + # irix is fussy about how it is fed its mount options + # - multiple -o's are not allowed + # - no spaces between comma delimitered options + + # this sed script replaces all -o's (except the first) with a comma + # not required for linux, but won't hurt + sed -e 's/[[:space:]]*-o[[:space:]]*/UnIqUe/1; s/[[:space:]]*-o[[:space:]]*/,/g; s/UnIqUe/ -o /1' +} + _scratch_mount_options() { _scratch_options mount - echo $SCRATCH_OPTIONS $MOUNT_OPTIONS $* $SCRATCH_DEV $SCRATCH_MNT + echo $SCRATCH_OPTIONS $MOUNT_OPTIONS $* $SCRATCH_DEV $SCRATCH_MNT | _mount_ops_minus_o_comma_replace } _scratch_mount() @@ -161,7 +172,7 @@ _scratch_mount() _test_mount() { _test_options mount - _mount -t $FSTYP $TEST_OPTIONS $MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR + _mount -t $FSTYP $(echo $TEST_OPTIONS $MOUNT_OPTIONS $* | _mount_ops_minus_o_comma_replace) $TEST_DEV $TEST_DIR } _scratch_mkfs_options()