Skip to content

Commit

Permalink
Merge pull request #2503 from rear/new_036_valid_output_methods_scrip…
Browse files Browse the repository at this point in the history
…t_issue2501

New 036_valid_output_methods.sh to error out for unsupported OUTPUT methods:
For "rear mkbackup/mkrescue/mkbackuponly/mkopalpba"
(i.e. for all workflows that run the 'prep' stage)
check that the OUTPUT method is actually implemented
i.e. check that a usr/share/rear/output/$OUTPUT directory exists
and error out when an OUTPUT method seems to be not supported
to ensure that the user cannot specify a non-working OUTPUT in etc/rear/local.conf
(cf. usr/share/rear/prep/default/035_valid_backup_methods.sh)
see #2501
  • Loading branch information
jsmeix committed Oct 19, 2020
2 parents fd89139 + cdd2b6c commit 011ea38
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions usr/share/rear/prep/default/036_valid_output_methods.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

# For "rear mkbackup/mkrescue/mkbackuponly/mkopalpba"
# (i.e. for all workflows that run the 'prep' stage)
# check that the OUTPUT method is actually implemented
# i.e. check that a usr/share/rear/output/$OUTPUT directory exists
# and error out when an OUTPUT method seems to be not supported
# to ensure that the user cannot specify a non-working OUTPUT in /etc/rear/local.conf
# see https://github.com/rear/rear/issues/2501
# and cf. usr/share/rear/prep/default/035_valid_backup_methods.sh

if ! test -d "$SHARE_DIR/output/$OUTPUT" ; then
Error "The OUTPUT method '$OUTPUT' is not supported (no $SHARE_DIR/output/$OUTPUT directory)"
fi

0 comments on commit 011ea38

Please sign in to comment.