Improved handling of dd failure
This commit is contained in:
parent
f6c56febbf
commit
a3a351bb59
@ -670,7 +670,14 @@ 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}"
|
||||
ret="$?"
|
||||
sync
|
||||
if test "$ret" -ne 0
|
||||
then
|
||||
echo "FAILURE: $sudo_cmd $dd_cmd was not successful" >&2
|
||||
return 18
|
||||
fi
|
||||
fi
|
||||
|
||||
# >>> ??? Erase possible GPT backup table at end of device ?
|
||||
|
@ -706,7 +706,14 @@ xdt_write_image() {
|
||||
else
|
||||
echo "Performing:"
|
||||
echo " $xdt_sudo_cmd $xdt_dd_cmd if='${1}' bs=1M of=/dev/'${2}' ; sync"
|
||||
$xdt_sudo_cmd "$xdt_dd_cmd" if="${1}" bs=1M of=/dev/"${2}" ; sync
|
||||
$xdt_sudo_cmd "$xdt_dd_cmd" if="${1}" bs=1M of=/dev/"${2}"
|
||||
xdt_ret="$?"
|
||||
sync
|
||||
if test "$xdt_ret" -ne 0
|
||||
then
|
||||
echo "FAILURE: $xdt_sudo_cmd $xdt_dd_cmd was not successful" >&2
|
||||
return 18
|
||||
fi
|
||||
fi
|
||||
|
||||
# >>> ??? Erase possible GPT backup table at end of device ?
|
||||
|
Loading…
Reference in New Issue
Block a user