This is a just a proposal for adding general profile support. I use runlevel 4 for managing different profiles including different network setups. This is done by having the line l4:4:wait:/sbin/rc $PROFILE in /etc/inittab. The variable is set at the boot prompt with grub. Now I can choose between many more runlevels than it is possible with init. grub.conf: title dhcp kernel /vmlinuz 4 root=xxx PROFILE=dhcp title home kernel /vmlinuz 4 root=xxx PROFILE=home title linux5 kernel /vmlinuz 4 root=xxx PROFILE=linux5 But to use my laptop in different networks, I had to change the line in /sbin/runscript.sh, where the net configuration is sourced: 54c54 [ "${NETSERVICE}" = "yes" ] && source "$(add_suffix /etc/conf.d/net)" --- [ "${NETSERVICE}" = "yes" ] && source "$(add_suffix etc/conf.d/${myservice%.*})" The different network init scripts are /etc/init/net.dhcp.eth0 /etc/init/net.home.eth0 /etc/init/net.linux5.eth0 with the corresponding configuration files /etc/conf.d/net.dhcp /etc/conf.d/net.home /etc/conf.d/net.linux5 My runlevels are: /etc/runlevels/boot/ /etc/runlevels/default/ /etc/runlevels/dhcp/ /etc/runlevels/home/ /etc/runlevels/linux5/ /etc/runlevels/noX/ /etc/runlevels/nonetwork/ I think this is a very small diff, and I would be glad to see it in one of the next sys-apps/baselayout releases. Criticism and comments are welcome. Kai Reproducible: Always Steps to Reproduce: 1. 2. 3.
We have support for this (was added for Adelie Cluster project). I'll try to do some docs at some stage in near future.
Maybe I should withdraw this request because there are too many oddities with other packages, mainly network hotplug stuff like ifplugd and the wireless script from the forum (http://forums.gentoo.org/viewtopic.php?t=122435).
We actually support this in baselayout-1.11.13 If you're in the runlevel "bar" then the init script is called "foo" then we do this /etc/conf.d/foo.bar - if found, then use this otherwise /etc/conf.d/foo - if found then use this