Ainsi parlait dam's :
> > > > > > And could other network-related files be specified as part of the
> > > > > > profile (hosts, hosts.allow & deny, exports, etc...) ?
> > > > >
> > > > > Ok, but it won't be able to save it in a profile. Or not easilly.
> > > > > Is it a pb?
> > > >
> > > > Yes. What's the use of including them in a profile if they are not
> > > > restaured along with it ? My idea was to extend the profile to
> > > > contains an optional list of additional files.
> > >
> > > oh great, that's a nice feature. But appart this, do you think those
> > > files (hosts, hosts.allow & deny, exports, etc...) should be included
> > > in a profile?
> >
> > No, no, i just have fun asking for complety useless features :-).
> > To be precise, i don't think these files must be always included, neither
> > that the exact list must be hard-coded. I was just imagining something
> > between drakprofile (where all /etc dir is saved) and current profile
> > (where just minimal set of files are saved), as an idea for future
> > development.
>
> ok thanx.
> What do you think about a cvs handling etc?
> a cron is committing every change you do on your /etc, and it's the best
> way to keep trace of changes. Each timnt one:e you want to save your config 
in a
> profile, you tag the whole thing. And with the branch system it's even more
> powerfull. That's one of the possibilities that is very nic, IMO
It's rather heavy, as it needs a cvs, and i don't want to keep trace of every 
changes. If just my network change, i don't want to save my X configuration ! 
However, i would like to start services or not, export directories or not, 
etc... So i was looking for something simple and extensible.

My own solution was this quick script, allowing me to declare any file or 
directory in /etc to be part of a profile, and using symlink to select the 
current one.
#!/bin/sh
 
if [ $# != 1 ] ; then
        echo  "usage: `basename $0` <profile>"
        exit 1
fi
 
echo "switching profile to $1"
 
for file in `find /etc -name "*.$1" 2>/dev/null`; do
        cd `dirname $file`
        ln -sf `basename $file` `basename $file .$1`
done
-- 
Guillaume Rousse <[EMAIL PROTECTED]>
GPG key http://bohm.snv.jussieu.fr/~rousse/gpgkey.html

Reply via email to