From 5dbb6726b46250bfcdc967db0261652b55e4f46a Mon Sep 17 00:00:00 2001 From: Allan Randall Date: Thu, 11 Jan 2007 02:56:11 +0000 Subject: [PATCH] fixed dmapi mount filter to work on irix Merge of master-melb:xfs-cmds:27901a by kenmcd. Execute bits changed from --- to xxx fixed dmapi mount filter to work on irix --- common.rc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common.rc b/common.rc index df6d02e0..7f13c27c 100644 --- a/common.rc +++ b/common.rc @@ -151,20 +151,20 @@ _mount_ops_filter() { params="$*" - #handle dmapi mtpt option correctly - let "last_index=$#-1" + #get mount point to handle dmapi mtpt option correctly + last_index=`expr $# - 1` [ $last_index -gt 0 ] && shift $last_index - FS_ESCAPED=`echo $1 | $SED_PROG -e 's/\\//\\\\\\//g'` - params="`echo $params | \ - $PERL_PROG -ne "s/mtpt=[^,|^\n|^\s]*/mtpt=$FS_ESCAPED\1\2/; print;"`" + FS_ESCAPED=$1 # 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 + # the sed script replaces all -o's (except the first) with a comma # not required for linux, but won't hurt - echo $params | sed -e 's/[[:space:]]*-o[[:space:]]*/UnIqUe/1; s/[[:space:]]*-o[[:space:]]*/,/g; s/UnIqUe/ -o /1' + + echo $params | sed -e 's/[[:space:]]*-o[[:space:]]*/UnIqUe/1; s/[[:space:]]*-o[[:space:]]*/,/g; s/UnIqUe/ -o /1' \ + | $PERL_PROG -ne "s#mtpt=[^,|^\n|^\s]*#mtpt=$FS_ESCAPED\1\2#; print;" + } _scratch_mount_options() -- 2.25.1