From 2022cafc54698f018b2fa55bcbba31fa6938b385 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 25 Apr 2019 18:43:13 -0400 Subject: src/block.sh: Delimit command operands --- diff --git a/src/block.sh b/src/block.sh index b1cd319..39c980c 100644 --- a/src/block.sh +++ b/src/block.sh @@ -52,14 +52,14 @@ block_mount() rand dir="$(get_vardata_dir 'mount')/block-$(printf '%010d' ${rand_x})" - if ! mkdir "${dir}"; then + if ! mkdir -- "${dir}"; then error "$(get_msg 'block_mkdir_fail')" "${dir}" return 1 fi - if ! mount "${dev}" "${dir}"; then + if ! mount -- "${dev}" "${dir}"; then error "$(get_msg 'block_mount_fail')" "${dev}" - rmdir "${dir}" + rmdir -- "${dir}" return 1 fi @@ -76,7 +76,7 @@ block_umount() i=0 timed_out=false - while ! umount "${dir}"; do + while ! umount -- "${dir}"; do i=$((${i} + 1)) if [ ${i} -eq 10 ]; then timed_out=true @@ -90,7 +90,7 @@ block_umount() return 1 fi - if ! rmdir "${dir}"; then + if ! rmdir -- "${dir}"; then error "$(get_msg 'block_rmdir_fail')" "${dir}" return 1 fi -- cgit v0.9.1