ffnord / ffnord-puppet-gateway

Deploy and manage your Freifunk community gateway, mostly compatible with Gluon.
15 stars 13 forks source link

Fix iptables persistent for debian jessie #156

Closed sventhomsen closed 8 years ago

sventhomsen commented 8 years ago

Debian Jessie renamed iptables-persistent to netfilter-persistent.

Script /usr/local/bin/build-firewall and manifest "firewall.pp" need a selector for choosing netfilter-persistent when running on jessie.

Solved by using a file-variant for the script and a conditional for the name of the service

rubo77 commented 8 years ago

wouldn't it be better to implement the distribution selection into the build firewall script instead of duplicating the whole script?

sventhomsen commented 8 years ago

Depends... I favor doing these kind of customizations in puppet, not at runtime.

But: I could convert the script to an erb-template and we would have best of both worlds: single source and customization at setup time :-)

Other opinions?

sargon commented 8 years ago

I think we should have the selector in the script itself. In a upgrade situation we should preserve functionality without the need to rerun our deploy script. We have such run-time checks all over the place, because we decided at some time that our script-foo should work without dependencies to puppet.

Furthermore duplicating the codebase is not the finest way.

I vote for run-time selection.

sventhomsen commented 8 years ago

OK, I'll change this... Closing this one....

sventhomsen commented 8 years ago

OK, changed to a runtime selector in /usr/local/bin/build-firewall

sargon commented 8 years ago

Okay, that's a diff I would merge. Please rebase the patchset and force push it into your PR Branch.

sventhomsen commented 8 years ago

Done.

sargon commented 8 years ago

Okay, that didn't work out as I planed to, but whatever.

sventhomsen commented 8 years ago

Ah. Should have cherry-picked that one. Sorry, forgot about that revert.