Unwrapped the tree usages of vraiable sudo_cmd, because it can be empty

This commit is contained in:
Thomas Schmitt 2019-12-04 12:18:57 +01:00
parent f419f51f1e
commit 245102072c

View File

@ -410,7 +410,7 @@ list_devices() {
fi fi
# Wanted or unwanted filesystem types # Wanted or unwanted filesystem types
fstypes=$("$sudo_cmd" "$lsblk_cmd" -n -o FSTYPE /dev/"$name") fstypes=$($sudo_cmd "$lsblk_cmd" -n -o FSTYPE /dev/"$name")
if test "$?" -gt 0 if test "$?" -gt 0
then then
fstypes="lsblk_fstype_error" fstypes="lsblk_fstype_error"
@ -561,7 +561,7 @@ write_image() {
then then
echo " $sudo_cmd $umount_cmd $i" echo " $sudo_cmd $umount_cmd $i"
else else
if "$sudo_cmd" "$umount_cmd" "$i" if $sudo_cmd "$umount_cmd" "$i"
then then
echo "Unmounted: $i" echo "Unmounted: $i"
else else
@ -594,7 +594,7 @@ write_image() {
else else
echo "Performing:" echo "Performing:"
echo " $sudo_cmd $dd_cmd if='${1}' bs=1M of=/dev/'${2}' ; sync" echo " $sudo_cmd $dd_cmd if='${1}' bs=1M of=/dev/'${2}' ; sync"
"$sudo_cmd" "$dd_cmd" if="${1}" bs=1M of=/dev/"${2}" ; sync $sudo_cmd "$dd_cmd" if="${1}" bs=1M of=/dev/"${2}" ; sync
fi fi
# >>> ??? Erase possible GPT backup table at end of device ? # >>> ??? Erase possible GPT backup table at end of device ?