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

Make ReaR disk label configurable (no hardcoded 'REAR-000') #1535

Closed
jsmeix opened this issue Oct 16, 2017 · 4 comments
Closed

Make ReaR disk label configurable (no hardcoded 'REAR-000') #1535

jsmeix opened this issue Oct 16, 2017 · 4 comments
Assignees
Labels
enhancement Adaptions and new features fixed / solved / done
Milestone

Comments

@jsmeix
Copy link
Member

jsmeix commented Oct 16, 2017

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
#1520
or a label that they like more in their environment as in
#1492

@jsmeix jsmeix added the enhancement Adaptions and new features label Oct 16, 2017
@jsmeix jsmeix added this to the ReaR future milestone Oct 16, 2017
@jsmeix jsmeix self-assigned this Oct 16, 2017
@gdha
Copy link
Member

gdha commented Oct 16, 2017

@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
Copy link
Member Author

jsmeix commented Oct 17, 2017

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
Copy link
Member

gdha commented Oct 17, 2017

@jsmeix 👍 I agree.

@jsmeix jsmeix modified the milestones: ReaR future, ReaR v2.3 Oct 18, 2017
jsmeix added a commit that referenced this issue Oct 18, 2017
…LABEL_issue1535

The new USB_DEVICE_FILESYSTEM_LABEL config variable
replaces the hardcoded 'REAR-000' value, see
#1535
This label is set for the ReaR data partition via the format workflow.
The default value is 'REAR-000'  to be backward compatible.
@jsmeix
Copy link
Member Author

jsmeix commented Oct 18, 2017

With #1536 merged,
this issue should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features fixed / solved / done
Projects
None yet
Development

No branches or pull requests

2 participants