Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error out for OUTPUT_URL=null together with OUTPUT=USB #1572

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 14 additions & 7 deletions usr/share/rear/prep/default/040_check_backup_and_output_scheme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,20 @@ fi
if test "$OUTPUT_URL" ; then
local output_scheme=$( url_scheme "$OUTPUT_URL" )
case $output_scheme in
(fish|ftp|ftps|hftp|http|https|sftp)
local required_prog='lftp'
has_binary $required_prog || Error "The OUTPUT_URL scheme '$output_scheme' requires the '$required_prog' command which is missing"
;;
(iso)
Error "The OUTPUT_URL scheme cannot be '$output_scheme'"
;;
(fish|ftp|ftps|hftp|http|https|sftp)
local required_prog='lftp'
has_binary $required_prog || Error "The OUTPUT_URL scheme '$output_scheme' requires the '$required_prog' command which is missing"
;;
(iso)
Error "The OUTPUT_URL scheme cannot be '$output_scheme'"
;;
(null)
# OUTPUT_URL=null conflicts with OUTPUT=USB
# because for OUTPUT=USB output/USB/Linux-i386/850_make_USB_bootable.sh
# wants to make the USB device bootable which cannot work with OUTPUT_URL=null
# see https://github.com/rear/rear/issues/1571#issuecomment-343467593
test "USB" = "$OUTPUT" && Error "'OUTPUT_URL=null' conflicts with 'OUTPUT=USB'"
;;
esac
fi