phlipper / chef-denyhosts

Chef cookbook for denyhosts package
MIT License
6 stars 6 forks source link

different packages expect config file in different places #5

Open dwradcliffe opened 11 years ago

dwradcliffe commented 11 years ago

From epel: /etc/denyhosts.conf From rpmforge: /etc/denyhosts/denyhosts.cfg

Not sure the best solution yet. I hate to have to pull the init template into the cookbook but that might be the only solution.

phlipper commented 11 years ago

@dwradcliffe is there an ohai attribute that you could use to determine which location to use?

dwradcliffe commented 11 years ago

I looked through all the attributes. I didn't see anything that would help.

phlipper commented 11 years ago

@dwradcliffe I don't use rpm-flavored distributions, so please pardon the questions. Is the issue about determining which specific distro is running, or about which yum source is being used to install the package?

dwradcliffe commented 11 years ago

No problem. The issue is which yum repository source is used to install the package. They are each (the 2 I saw) packaged with different config and config locations.

phlipper commented 11 years ago

@dwradcliffe is there a repository configuration file that we could check, something along the lines of a /etc/yum/sources.d/epel.conf, or does yum have a command to list sources that are currently enabled?

dwradcliffe commented 11 years ago

It's very likely that both sources are available and enabled. However we might be able to check which one was used to install the installed version.

yum info denyhosts | grep "From repo" results in From repo : rpmforge