Profile rc idea

Alexander Leidinger Alexander at
Fri May 29 09:17:13 UTC 2009

Quoting Nathan Lay <nslay at> (from Thu, 28 May 2009 18:40:36 -0400):

> Hi list,
> Wasn't sure which list this idea belongs, so I sent it here.  It

arch@ (cced) is the generic place to discuss architectural changes of  

> would be interesting if rc was extended to support profiles.  Each  
> profile would reflect a different system configuration.  For example  
> profiles could describe the computing environment at: home, work,  
> friend's house, airplane, etc... The active profile the system uses  
> could be chosen based on some contingency condition.  For example,  
> simply prompting the user to choose an rc profile at boot, or using  
> hardware to choose the profile (e.g. like location based contingency  
> using GPS hardware), or whatever...  I guess this only pertains to  
> booting though, but rc seems like a natural place to do this.   
> Thoughts, comments?  Yet another idea I have no time to try...

You can already do this in rc.conf:

case ${location} in
    echo wrong location set
    exit 1
    # alternatively use some kind of default setup

This way you need to know before where you are, or boot into  
single-user mode. You can also extend it to read a kenv  
("location=$(/bin/kenv profile.location)"), this way you can specify  
the location in the loader (bonus points to implement a loader  
extension in forth to read a file which lists possible profiles and  
offer them in the menu).


	"I keep seeing spots in front of my eyes."
	"Did you ever see a doctor?"
	"No, just spots."    Alexander @ PGP ID = B0063FE7       netchild @  : PGP ID = 72077137

More information about the freebsd-arch mailing list