#1535 Issue closed
: Make ReaR disk label configurable (no hardcoded 'REAR-000')¶
Labels: enhancement
, fixed / solved / done
jsmeix opened issue at 2017-10-16 10:29:¶
Currently the ReaR disk label 'REAR-000'
is hardcoded used at several places in the code.
With a config variable like
REAR_DISK_LABEL="REAR-000"
users could use several differently labeled disks
for example differently labeled USB disks as in
https://github.com/rear/rear/issues/1520
or a label that they like more in their environment as in
https://github.com/rear/rear/issues/1492
gdha commented at 2017-10-16 14:28:¶
@jsmeix I would propose to use a name like REAR_USB_DISK_LABEL
instead
- makes it clear where the name stands for, otherwise, we create more
confusion instead of making the end-user easier. Remember, the more
choices there are, the number of errors may increase due to
misunderstanding the meaning of these variables
jsmeix commented at 2017-10-17 09:02:¶
My initial variable name proposal was just a shot in the dark.
Meanwhile I think this config variable should be named
in compliance with the other config variables that are
used for "rear format" i.e. with a "USB_DEVICE_" prefix.
I would like to avoid "REAR" in ReaR config variable names
because in general it is meaningless to have "REAR" in
ReaR config variable names because obviously all
those variables are about ReaR (and "REAR" is
wrong spelling of "ReaR" ;-)
Accordingly I think we should use in default.conf
USB_DEVICE_FILESYSTEM_LABEL='REAR-000'
It matches well what there is currently described in default.conf
# Filesystem to use for the 'REAR-000' labeled ReaR data partition ... USB_DEVICE_FILESYSTEM=ext3
And USB_DEVICE_FILESYSTEM_LABEL is technically correct
because that label is set during "rear format" in
format/USB/default/300_format_usb_disk.sh
and in
format/USB/default/350_label_usb_disk.sh
as a label of a particular filesystem (like /dev/sdb2)
and not as a label of a whole disk (like /dev/sdb).
We have already "USB_DEVICE_PARTED_LABEL"
which might be confusing but if things are sufficiently
documented in default.conf everything should be clear.
gdha commented at 2017-10-17 09:29:¶
@jsmeix 👍 I agree.
jsmeix commented at 2017-10-18 14:40:¶
With
https://github.com/rear/rear/pull/1536
merged,
this issue should be fixed.
[Export of Github issue for rear/rear.]