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
# 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
then
fstypes="lsblk_fstype_error"
@ -561,7 +561,7 @@ write_image() {
then
echo " $sudo_cmd $umount_cmd $i"
else
if "$sudo_cmd" "$umount_cmd" "$i"
if $sudo_cmd "$umount_cmd" "$i"
then
echo "Unmounted: $i"
else
@ -594,7 +594,7 @@ write_image() {
else
echo "Performing:"
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
# >>> ??? Erase possible GPT backup table at end of device ?