Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: setup: do not mark iptables unremovable if not actually used ......................................................................
packaging: setup: do not mark iptables unremovable if not actually used Change-Id: I682c001567e3271fa6a10e166d9c2b83fc643995 Signed-off-by: Alon Bar-Lev <alo...@redhat.com> --- M packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py 1 file changed, 18 insertions(+), 10 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/40/18740/1 diff --git a/packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py b/packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py index 904da87..e256667 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py +++ b/packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py @@ -219,16 +219,6 @@ self.environment[ otopicons.NetEnv.IPTABLES_RULES ] = self._createIptablesConfig() - # This file is updated by otopi. Here we just prevent it from - # being deleted on cleanup. - # TODO: copy/move some uninstall code from the engine to otopi - # to allow just adding lines to iptables instead of replacing - # the file and also remove these lines on cleanup. - self.environment[ - osetupcons.CoreEnv.UNINSTALL_UNREMOVABLE_FILES - ].append( - osetupcons.FileLocations.SYSCONFIG_IPTABLES, - ) self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append( filetransaction.FileTransaction( @@ -241,6 +231,24 @@ ) @plugin.event( + stage=plugin.Stages.STAGE_MISC, + condition=lambda self: self.environment[ + otopicons.NetEnv.IPTABLES_ENABLE + ], + ) + def _iptablesmark(self): + # This file is updated by otopi. Here we just prevent it from + # being deleted on cleanup. + # TODO: copy/move some uninstall code from the engine to otopi + # to allow just adding lines to iptables instead of replacing + # the file and also remove these lines on cleanup. + self.environment[ + osetupcons.CoreEnv.UNINSTALL_UNREMOVABLE_FILES + ].append( + osetupcons.FileLocations.SYSCONFIG_IPTABLES, + ) + + @plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, before=( osetupcons.Stages.DIALOG_TITLES_E_SUMMARY, -- To view, visit http://gerrit.ovirt.org/18740 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I682c001567e3271fa6a10e166d9c2b83fc643995 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches