#2074 Issue closed: move RULE_FILES to default.conf as UDEV_NET_MAC_RULE_FILES

Labels: enhancement, cleanup, fixed / solved / done

gdha opened issue at 2019-03-08 13:07:

  • ReaR version ("/usr/sbin/rear -V"): 2.4

  • Description of the issue (ideally so that others can reproduce it): follow-up on the discussion held in PR #2049 it would maybe easier to have the RULE_FILES setting in the GNU/Linux.conf file as UDEV_RULE_FILES instead of defining these in the 2 scripts individual

  • usr/share/rear/skel/default/etc/scripts/system-setup.d/55-migrate-network-devices.sh
  • usr/share/rear/finalize/GNU/Linux/310_migrate_udev_rules.sh

This way it would be simple to adjust the values according the end-user's wishes.

jsmeix commented at 2019-03-08 13:41:

I always appreciate any kind of "provide final power to the user"
which means I always appreciate new user config variables
so that - if needed - the user can overwrite ReaR's automatisms.

I think if a new user config variable UDEV_RULE_FILES is set
in conf/GNU/Linux.conf it must be at least described in conf/default.conf
because all user config variables must be in conf/default.conf.

By the way:
All variables that are currently set in conf/GNU/Linux.conf
are also set in conf/default.conf (some to empty values).

I think it is sufficient to set UDEV_RULE_FILES only in default.conf.

In general I do not understand why some are set both
in default.conf and additionally also in conf/GNU/Linux.conf.

I found and find it always somewhat confusing to have two places
where the defaults are set.

As far as I know ReaR runs only on GNU/Linux systems
so that I assume conf/GNU/Linux.conf is always sourced
or are there cases where conf/GNU/Linux.conf is not sourced?

gdha commented at 2019-03-08 13:55:

@jsmeix Thanks Johannes - well back in 2006 @schlomo and @gdha were very optimistic that ReaR could also work on BSD style systems (e.g. OS/X). I guess we were too optimistic ;-)

jsmeix commented at 2019-03-08 14:03:

thank you so much for your explanation!

Now I understand why there is a separated conf/GNU/Linux.conf
Should we get rid of it and merge Linux.conf into default.conf?

If at some future time ReaR should work also on non-Linux systems
we would have to carefully dissect all the current settings in default.conf
anyway because I guess many of the current settings in default.conf
are made with only Linux in mind.

schlomo commented at 2019-03-08 14:16:

👍 for getting rid of GNU/Linux.conf (and similar) as ReaR in any case only works on Linux as of now. When somebody wants to support other OS they will reorganize the configuration as necessary.

jsmeix commented at 2019-03-08 14:39:

Via https://github.com/rear/rear/issues/2075 I will
merge conf/GNU/Linux.conf (and similar) into default.conf
after the ReaR 2.5 release (i.e. for ReaR 2.6) because that issue
is not at all urgent and I fear I may break things if I do it now.

jsmeix commented at 2019-04-26 08:47:

With https://github.com/rear/rear/pull/2123 merged
I consider this issue to be fixed.

[Export of Github issue for rear/rear.]