diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-25 18:43:13 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-25 18:43:13 (EDT) |
commit | 2022cafc54698f018b2fa55bcbba31fa6938b385 (patch) | |
tree | b49ad55b364aa81931ce54b5ba79cb296fce6bf4 | |
parent | 2d8882d057f8f71751856cd0ec59f52f50170dbd (diff) |
src/block.sh: Delimit command operands
-rw-r--r-- | src/block.sh | 10 |
1 files changed, 5 insertions, 5 deletions
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 |