brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreaturli <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: fix/BROOKLYN-36
Date Fri, 11 Jul 2014 07:47:52 GMT
Github user andreaturli commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/62#discussion_r14809842
  
    --- Diff: utils/common/src/main/java/brooklyn/util/ssh/IptablesCommands.java ---
    @@ -93,7 +93,7 @@ public static String iptablesServiceStatus() {
          */
         public static String saveIptablesRules() {
             return BashCommands.alternatives(
    -                BashCommands.ifExecutableElse1("iptables-save", sudo("iptables-save")),
    +                BashCommands.ifExecutableElse1("apt-get", BashCommands.installPackage("iptables-persistent")),
    --- End diff --
    
    Thanks @ahgittin for your comments.
    
    My idea is slightly different: I wanted to make the `saveIptablesRules` more portable
across distros.
    For rhel/centos the suggested way is to use `service iptables save` while for debian/ubuntu
it is available a package called `iptables-persistent` which install a service on the box
that save the iptables rules any time they change, afaik.
    
    Instead `iptables-save` seems misused here as it is generally useful when you want to
export iptables rules to a file using i.e.: `iptables-save > /etc/sysconfig/iptables` and
then `iptables-restore < /etc/sysconfig/iptables` but this doesn't look helpful here. wdyt?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message