#1524 Issue closed: 'MASKS readonly variable' reported during recovery system startup

Labels: fixed / solved / done, minor bug

jsmeix opened issue at 2017-10-04 15:03:

I am using current ReaR master code.

During recovery system startup I noticed a message about
'MASKS readonly variable'
that is soon cleared from the recovery system startup screen
by the subsequent recovery system login screen.

I found the following piece of code in
usr/share/rear/lib/network-functions.sh

readonly -a MASKS=(

but - at least on a first glance - I fail to see where
that readonly variable would be changed.

jsmeix commented at 2017-10-04 15:12:

I assume the 'MASKS readonly variable' message happens
because during the recovery system startup
the 'network-functions.sh' is sourced three times by
skel/default/bin/dhclient-script
and also by
skel/default/etc/scripts/system-setup.d/00-functions.sh
and by
skel/default/etc/scripts/system-setup.d/58-start-dhclient.sh

@schabrolles
I think your
https://github.com/rear/rear/commit/b01c8a97cc3b678f815a9a7bac8f061dabfb40a7
could be the reason.

jsmeix commented at 2017-10-04 15:17:

Starting the ReaR recovery system in debug mode
(i.e. with additional kernel commandline parameter 'debug')
shows that during 58-start-dhclient.sh there is the

/usr/share/rear/lib/network-functions.sh: line 7: MASKS: readonly variable

message and I think this happens because since
https://github.com/rear/rear/commit/b01c8a97cc3b678f815a9a7bac8f061dabfb40a7
/usr/share/rear/lib/network-functions.sh was already sourced
in 00-functions.sh so that now sourcing it again in
58-start-dhclient.sh results that 'readonly variable' message.

jsmeix commented at 2017-10-04 15:19:

@gdha
because skel/default/etc/scripts/system-setup.d/58-start-dhclient.sh
is mostly your code I assign this issue also to you
to have a look how we could fix it properly.

jsmeix commented at 2017-10-05 16:13:

I will fix this issue
together with https://github.com/rear/rear/issues/1517
via https://github.com/rear/rear/pull/1526

jsmeix commented at 2017-10-06 13:30:

I consider it to be fixed via
https://github.com/rear/rear/pull/1526#issuecomment-334753229
if not the issue can be reopened.


[Export of Github issue for rear/rear.]