the funktion add_suffix in /etc/init.d/functions.sh does not set the right suffix in conjunction with RC_USE_CONFIG_PROFILE. As the description for the rc var RC_USE_CONFIG_PROFILE in /etc/conf.d/rc: # RC_USE_CONFIG_PROFILE allows you to have different /etc/conf.d files # based on your runlevel - if a conf.d file for your profile does not exist # then we try and use the default one. # To enable runlevel selection at boot, append "softlevel=foobar" to your # kernel line to change to the foobar runlevel. Or "rc foobar" at the command # prompt. should it possible to change the suffix through rc <softlevel>, but it is not because the funktion add_suffix use DEVAULTLEVEL as suffix if RC_USE_CONFIG_PROFILE is set, which is not changed through rc <softlevel>. I have change the function to set the right suffix depending on the current Runlevel: add_suffix() { if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -e "$1.$mylevel" ] then echo "$1.${LEVEL}" else echo "$1" fi return 0 } Reproducible: Always Steps to Reproduce: 1. 2. 3.
(In reply to comment #0) > the funktion add_suffix in /etc/init.d/functions.sh does not set the right > suffix in conjunction with RC_USE_CONFIG_PROFILE. > > As the description for the rc var RC_USE_CONFIG_PROFILE in /etc/conf.d/rc: > > # RC_USE_CONFIG_PROFILE allows you to have different /etc/conf.d files > # based on your runlevel - if a conf.d file for your profile does not exist > # then we try and use the default one. > # To enable runlevel selection at boot, append "softlevel=foobar" to your > # kernel line to change to the foobar runlevel. Or "rc foobar" at the command > # prompt. > > should it possible to change the suffix through rc <softlevel>, but it is not > because the funktion add_suffix use DEVAULTLEVEL as suffix if > RC_USE_CONFIG_PROFILE is set, which is not changed through rc <softlevel>. > > I have change the function to set the right suffix depending on the current > Runlevel: > > add_suffix() { > if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -e "$1.$mylevel" ] > then > echo "$1.${LEVEL}" > else > echo "$1" > fi > > return 0 > } > > > Reproducible: Always > Steps to Reproduce: > 1. > 2. > 3. this bug belongs to baselyout-1.11.13
it looks like that, this belongs to all baselyoutversions 1.11.13 and greater. Only when in new versions the DEFAULTLEVEL Shell-var will be not change through an rc <softlevel> call.
You understand it incorrectly (and I gather the help is not that great). The RC_USE_CONFIG_PROFILE is really only enabled if you _boot_ with kernel params 'softlevel="foobar"' or whatever, and from there on it will stay like that until reboot. Meaning, if you boot with 'softlevel="home"', "home" will be appended to all your config files (if they exist) until you reboot. This is so that you can have different profiles, say 'home' and 'work' ... Roy, mind tweaking the help there?
hmm why not have it also working when someone is changing the softlevel through rc <softlevel> ?? It makes for me more sense when it is also takes effect when changing the softlevel through rc. For example: You start your Laptop in softlevel nonetwork. After a while you want to search for something in the internet. In the current behave you must reboot with softlevel set to e.g. network or network-office to have access to the internet/network. But if you can change it also through rc you must not reboot your Laptop. So you see it's a good idea to change the behave of this.
ups there is a bug in my modification so here the correct one: add_suffix() { if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -e "$1.{$mylevel}" ] then echo "$1.${mylevel}" else echo "$1" fi return 0 }
I fully support the point made by Stephan Wezel. As Stephan already mentioned, switching between different network (or more general system) profiles is vital to a clean, dynamic laptop configuration. I am currently using Stephan's slight modification but I have noticed that it has not yet been included into the baselayout release. Could you please argue why it has not been included and whether/when it will be included in a future release? Personally, I don't see any negative effects of the modification and I also don't see any advantage in enforcing a reboot when switching profiles.
I also totally agree with the comments of Wezel and Heinz. I am using this modification on my laptop for being able to change networks with rc <...> with all depending network services. And I am waiting for a corrected baselayout, so I don't have to change it on my own every time.
Will be fixed in baselayout-1.12.0_pre10
thanks