[NBLUG/talk] Profiles

Eric Eisenhart eric at nblug.org
Wed Jul 30 12:51:02 PDT 2003


On Wed, Jul 30, 2003 at 01:54:38PM -0500, Warren Raquel wrote:
> I was wondering how I could set up my laptop so that I can just make 
> different grub entries to set up my networking dependant on where I'm 
> at. i.e. I set up a grub entry saying 'office' or one saying 'home' or 
> one as 'wireless school', etc. I would guess I could set up a script to 
> set up my networking but can I specify a shell variable or something of 
> the like at the boot prompt that would pass to a script or that a script 
> could read as a variable? Is there some easier way of doing this? TIA.

I can think of 2 ways you could do this:

1) Set up separate run levels.  Say 2=office, 3=home, 4=school.  This only
works for 4 configs, since 0, 1 and 6 are "special" and really can't be
messed with.  This also changes your system significantly away from the
defaults, which could be a problem.

2) Add a fairly arbitrary option to your boot parameters.  say
"WARREN_BOOT_LOCATION=office".  Then have the script you're talking about
read /proc/cmdline and parse that bit out.

This does seem to have the disadvantage of requiring an actual shutdown of
the laptop to switch "locations"...  Personally, my laptop usually has an
uptime of at least several weeks; it just sleeps in between uses.
-- 
Eric Eisenhart
NBLUG Co-Founder & Vice-President Pro Tempore
The North Bay Linux Users Group
http://nblug.org/
eric at nblug.org, IRC: Freiheit at freenode, AIM: falschfreiheit, ICQ: 48217244



More information about the talk mailing list