[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-user
Subject:    Re: [gentoo-user] gentoo and "rc hell"?
From:       Adi <adriancapdefier () digifin ! ro>
Date:       2005-01-04 16:32:58
Message-ID: 200501041832.58147.adriancapdefier () digifin ! ro
[Download RAW message or body]

Marţi 04 Ianuarie 2005 17:36, Dmitry S. Makovey a scris:
> Hi everybody,
>
> Brief:
> I've got simple question: is it possible to support multiple environment
> configuration with gentoo like "netenv" in Debian?
>
> Full:
> I've got laptop which I use in several different environments: home,
> office, presentation, server room, etc. Each requires number of
> configuration files to be altered (xorg.conf, net, hostname, etc.) and
> different services to be run.  Now I've read about custom "run-levels" for
> gentoo but couldn't figure out how to apply it to different sets of config
> files.
>
> So far I've developed set of scripts to manage environment changes by
> simply copying files from /etc/laptop.d/<env_name> to /etc so everything
> works fine, BUT when I try to use those scripts on startup I have a
> problem: I need to run my script after local systems are mounted (I have
> helper scripts in /usr/local/sbin so I can reconfigure laptop "on-the-fly"
> without reboot) but before hostname is set up and network interfaces are
> brought up. Doing any combination of "after", "before" and "needs" in my
> rc-script I just can't make it run when I need it to (i.e. just after
> localmount and before hostname).
>
> Any suggestions and hints are welcome.
An init script at bootlevel, that executes before * (but after mount?) that 
copies the files from /etc/laptop.d/<profile>.
The way to specify <profile> would be by putting it in /etc/conf.d/script or 
if you fancy a boot parameter in grub (to be parsed from /proc/cmdline) or 
both with the second overriding the first.
-- 
Adi

--
gentoo-user@gentoo.org mailing list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic