#3030 PR merged: Update 200_check_usb_layout.sh

Labels: enhancement, cleanup, fixed / solved / done

casantos opened issue at 2023-07-24 01:23:

Issue an error message and exit if USB_DEVICE_FILESYSTEM is invalid, instead of setting it to "ext3". It's safer to fail due to configuation errors than to ignore/fix them silently.

Fixes: issue #3029

  • Type: Bug Fix

  • Impact: Low

  • Reference to related issue (URL): https://github.com/rear/rear/issues/3029

  • How was this pull request tested?

    Ran rear mkbackup with a configuration containing

    BACKUP=NETFS
    BACKUP_PROG_COMPRESS_OPTIONS=( )
    BACKUP_PROG_COMPRESS_SUFFIX=
    BACKUP_URL=usb:///dev/disk/by-label/REAR-000
    MODULES=()
    OUTPUT=USB
    USB_BOOTLOADER=grub
    USB_DEVICE_FILESYSTEM=xfs
    USB_DEVICE_PARTED_LABEL=gpt
    USB_UEFI_PART_SIZE=2048
    SECURE_BOOT_BOOTLOADER=/boot/efi/EFI/redhat/shimx64.efi
    
  • Brief description of the changes in this pull request:

Issue an error message and exit if USB_DEVICE_FILESYSTEM is invalid.

jsmeix commented at 2023-07-25 09:35:

@casantos
thank you for your contribution
to make ReaR behave more in compliance with
https://github.com/rear/rear/wiki/Coding-Style

I think it is not a bug because conf/default.conf reads

# Only ext3 and ext4 are supported by the format workflow.

jsmeix commented at 2023-07-25 09:41:

@rear/contributors
please have a look here (as time permits),
perhaps I may have overlooked something.

I would like to merge it on Thursday afternoon
unless there are objections.

jsmeix commented at 2023-07-25 12:15:

Yes, I fully agree with you,
cf. your
https://github.com/rear/rear/pull/3025#issuecomment-1644125846
and my
https://github.com/rear/rear/pull/3025#issuecomment-1645441763
that reads (excerpt)

What is still questionable is if ReaR should
try to silently "correct" a user specified value
like "only blank characters" == "no characters",
...
or
if ReaR should not try to "correct" user specified values?

The more I am thinking about it the more I think that
ReaR should not try to "correct" user specified values
but error out when a user specified value is wrong.


[Export of Github issue for rear/rear.]