Different profile "modes"

Gerard Beekmans gerard at linuxfromscratch.org
Fri May 16 17:31:13 PDT 2003


Hi guys,

Today I've found that I'm in need for different profile "modes" as it were to 
allow the same profile with some subtle changes to it.

For instance, I have an LFS-CVS profile here that'll build the current CVS 
book. Now I had to create a second profile that does exactly what the lfs-cvs 
one does, except it does not run the "make checks" (simply to reduce the 
build time if I need to check something trivial that doesn't require me 
running make check everywhere). So now I've got two sets of profiles and 
whenever the LFS book changes I have two sets of files to maintain.

To increase the unmanagability factor, let's throw in my lfs-bootcd profile. 
It will build an LFS system according to LFS-CVS but with different kinds of 
changes (fstab, kernel, install a few additional packages, and don't install 
certain lfs-book packages). Now when I make a change to the lfs-book I've got 
three sets of files to maintain with it.

Of course there'll be more profiles for my different systems and soon I'll 
spend 5 minutes editing the book and half an hour editing profiles (yes I'm 
exagerating but get my drift?)

I'm not sure how I envision these different "modes"  but a simple if-then-else 
logic would come to mind.

If mode="lfs-cvs"; then add this to /etc/fstab
if mode="somethign else" add these lines to /etc/fstab
if mode="foo" do install this package
else do not install this package

And so on.



-- 
Gerard Beekmans
http://linuxfromscratch.org

/* Linux Consultant --- OSDN / DevChannel *
 * Technical Writer --- CheapBytes        */

/* If Linux doesn't have the solution, you have the wrong problem */

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message



More information about the alfs-discuss mailing list