Some corrections of the previous commit
This commit is contained in:
parent
ab2af1dff2
commit
f6c56febbf
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
# All names of variables and functions begin by "xdt_" in order to facilitate
|
# All names of variables and functions begin by "xdt_" in order to facilitate
|
||||||
# the re-use of this code by inclusion or forking and expansion.
|
# the re-use of this code by inclusion or forking and expansion.
|
||||||
# Before using most of the other functions it is necessary to run
|
# Before using most of the functions it is necessary to run
|
||||||
# xdt_init ; xdt_reset_job
|
# xdt_init ; xdt_reset_job
|
||||||
# The only function which may be run earlier is xdt_set_lang_c .
|
# The only function which may be run earlier is xdt_set_lang_c .
|
||||||
# The function xtd_main gets run by the code at the end of this file
|
# The function xtd_main gets run by the code at the end of this file
|
||||||
@ -767,11 +767,10 @@ xdt_decide_writing()
|
|||||||
xdt_dummy=dummy
|
xdt_dummy=dummy
|
||||||
else
|
else
|
||||||
echo "WRITE RUN PREVENTED by user input '$xdt_dummy'." >&2
|
echo "WRITE RUN PREVENTED by user input '$xdt_dummy'." >&2
|
||||||
return 12
|
return 17
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
xdt_write_image "$xdt_image_file" $xdt_candidates
|
xdt_write_image "$xdt_image_file" $xdt_candidates || return "$?"
|
||||||
exit $?
|
|
||||||
else
|
else
|
||||||
xdt_candidates=$(echo $xdt_candidates)
|
xdt_candidates=$(echo $xdt_candidates)
|
||||||
if test -n "$xdt_dummy_run"
|
if test -n "$xdt_dummy_run"
|
||||||
@ -815,32 +814,32 @@ xdt_decide_writing()
|
|||||||
xdt_main()
|
xdt_main()
|
||||||
{
|
{
|
||||||
xdt_set_lang_c
|
xdt_set_lang_c
|
||||||
xdt_init || exit "$?"
|
xdt_init || return "$?"
|
||||||
|
|
||||||
xdt_reset_job
|
xdt_reset_job
|
||||||
xdt_arg_interpreter "$@" || exit "$?"
|
xdt_arg_interpreter "$@" || return "$?"
|
||||||
|
|
||||||
if test -n "$xdt_do_plug_test"
|
if test -n "$xdt_do_plug_test"
|
||||||
then
|
then
|
||||||
xdt_plug_in_watcher || exit "$?"
|
xdt_plug_in_watcher || return "$?"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
xdt_list_devices || exit "$?"
|
xdt_list_devices || return "$?"
|
||||||
|
|
||||||
if test -z "$xdt_list_all" -a -n "$xdt_do_write"
|
if test -z "$xdt_list_all" -a -n "$xdt_do_write"
|
||||||
then
|
then
|
||||||
xdt_decide_writing || exit "$?"
|
xdt_decide_writing || return "$?"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$xdt_devs"
|
if test -n "$xdt_devs"
|
||||||
then
|
then
|
||||||
exit $xdt_not_advised
|
return $xdt_not_advised
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if test -z "$no_xorriso_dd_target_run"
|
if test -z "$no_xorriso_dd_target_run"
|
||||||
then
|
then
|
||||||
xdt_main "$@"
|
xdt_main "$@" || exit "$?"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user