diff --git a/dora/integration/fuse/bin/alluxio-fuse b/dora/integration/fuse/bin/alluxio-fuse index 54ec59677ff4..79a61a78f272 100755 --- a/dora/integration/fuse/bin/alluxio-fuse +++ b/dora/integration/fuse/bin/alluxio-fuse @@ -186,7 +186,12 @@ launch_fuse_process() { while getopts "o:hf" opt > /dev/null 2>&1; do case "${opt}" in o) - mount_options+="${OPTARG}," + KV_PAIRS=(${OPTARG//,/ }) # split OPTARG by `,` into array + for pair in "${KV_PAIRS[@]}"; do + if [[ -n "$pair" ]]; then + mount_options+=" -o $pair" + fi + done ;; f) foreground='true' @@ -199,19 +204,14 @@ launch_fuse_process() { ;; esac done + readonly mount_options readonly foreground - + if fuse_mounted "${mount_point}"; then err "mount: ${mount_point} is already mounted" return 1 fi - mount_options="$(echo "${mount_options}" | sed -E 's/,*$//g')" # remove trailing comma - if [[ -n "${mount_options}" ]]; then - mount_options="-o ${mount_options}" - fi - readonly mount_options - if [[ "${foreground}" == 'true' ]]; then ALLUXIO_FUSE_JAVA_OPTS+=" -Dalluxio.logger.type=FUSE_LOGGER,Console" fi