View previous topic :: View next topic |
Author |
Message |
fpemud Guru
Joined: 15 Feb 2012 Posts: 349
|
Posted: Thu Mar 06, 2014 9:27 pm Post subject: how to import / export eselect settings |
|
|
I'm writing a tool to easily compare and merge the configuration between all my gentoo machines, configuration in ALL aspects.
/etc comparison is easy.
/var/lib/portage/world comparision is easy.
kernel config comparision is easy.
grub.cfg comparison is easy.
configuration in user's home directory is not in the scope of this project, this tool is for system configuration only.
Now how can I compare and merge all the eselect settings?
The simplest way I think is to export them into a text file, and import the modified text file after merging. |
|
Back to top |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Fri Mar 07, 2014 11:21 am Post subject: |
|
|
I might be mistaken but I think all the settings configured via eselect go into /etc/env.d/ ....
HTH
swimmer |
|
Back to top |
|
|
fpemud Guru
Joined: 15 Feb 2012 Posts: 349
|
Posted: Fri Mar 07, 2014 1:19 pm Post subject: |
|
|
I don't think so.
For example:
"eselect kernel set N" changes the soft-link /usr/src/linux
The result of "eselect kernel list" changes after I manually recreate soft-link /usr/src/linux |
|
Back to top |
|
|
SirRobin2318 Apprentice
Joined: 24 Apr 2004 Posts: 241 Location: Strasbourg, france.
|
Posted: Fri Mar 07, 2014 2:21 pm Post subject: |
|
|
Yes, using strace on eselect you'll see it actually checks the symlink (in the case of kernel list).
Your tool could just rely on the output of eselect though.
Something like this should do the trick:
Code: | for i in /usr/share/eselect/modules/*; do
m=`basename $i | sed 's/.eselect//;'`;
echo $m:;
eselect $m list;
done |
Or, if you're using zsh:
Code: | for m in /usr/share/eselect/modules/*; do eselect $m:t:r list; done |
|
|
Back to top |
|
|
|