On Mon, 23 Jul 2007 14:15:42 -0500, Jeff wrote:

> I know that baselayout can handle certain services, but how do I
> combine that with the need for
> various host files, resolve.conf files, gateway, hostname, domainname, 
> ESSID, etc. Even default printers would be nice.
> 
> I need to support choosing one of several configurations at boot time, 
> via grub:
> 1) home-wireless-dhcp
> 2) home-wired-dhcp
> 3) work1-wired
> 4) work2-wireless-dhcp

You can do this by setting RC_USE_CONFIG_PROFILE="yes" in /etc/conf.d/rc
The comment in the same file explains it

# 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.  Here we would search for
# /etc/conf.d/<service>.foobar config files before trying to use the default
# /etc/conf.d/<service>.
# Note that it is only active if 'softlevel' was specified via the kernel line,
# and it is intended to use for different grub/lilo entries to specify config
# changes for say laptops between home and work, where you would have setup
# 'work' and 'home' runlevels, with /etc/conf.d/*.<runlevel> as needed.

If you need the same services to start in each config, but with different
configurations, you can make the various runlevel directories symlinks
to /etc/runlevels/default.


-- 
Neil Bothwick

Voting Democrat or Republican is like choosing a cabin in the Titanic.

Attachment: signature.asc
Description: PGP signature

Reply via email to