Kulbir Saini wrote:
Hi!

   Since we now have more than 20 plugins for yum and more are popping up, it
would be a good idea to have a single configuration file for all the
plugins with a format similar to that of .repo files.

[plugin_name1]
enabled=1
parameter1=foo
parameter2=bar

[plugin_name2]
enabled=0
parameter1=foofoo
parameter2=barbar

   Reason:
      1. Say, I have 20 plugins installed and enabled. Now, I want to disable
10 of them randomly. I have to open 10 files one by one and do
enabled=0. That seems a lot of work and also looks quite frustrating. I
think keeping everything in a single file will make things easier :)

No, you need to learn to use scripting :)

With a separate config file for each plugin, one can do something like this:

#!/bin/bash
confdir='/etc/yum/pluginconf.d'
plugins='foo bar foo1 bar2'
for p in $plugins; do
    perl -pie 's/^enabled.*/enabled=0/' $confdir/$p.conf
done


That becomes much harder with one file containing separate sections.

R.

_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to