Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix whitespace and bracket style

  • Loading branch information...
commit e269a9fdc69f758325709224bac55828c0e7025c 1 parent 0e969a2
@jnorell jnorell authored
Showing with 22 additions and 8 deletions.
  1. +22 −8 vzfirewall
View
30 vzfirewall
@@ -34,18 +34,32 @@ GetOptions(\%opt, 'help|h', 'version|V', 'apply|a', 'test|t',
'force|f', 'dir|d=s', 'conf|c=s', 'rules=s', 'verbose|v',
) or exit(1);
-if ($opt{help}) { pod2usage( -verbose => $opt{verbose} ? 2 : 1 ); }
-if ($opt{version}) { print "vzfirewall $VERSION\n"; exit(0) }
-if ($opt{conf}) { $CONF = $opt{conf}; }
+if ($opt{help}) {
+ pod2usage( -verbose => $opt{verbose} ? 2 : 1 );
+}
+if ($opt{version}) {
+ print "vzfirewall $VERSION\n"; exit(0)
+}
+if ($opt{conf}) {
+ $CONF = $opt{conf};
+}
# todo: read config file here
-if ($opt{rules}) { $IPTABLES = $opt{rules}; }
-if ($opt{dir}) { $DIR = $opt{dir}; }
+if ($opt{rules}) {
+ $IPTABLES = $opt{rules};
+}
+if ($opt{dir}) {
+ $DIR = $opt{dir};
+}
-if ($opt{test}) { do_apply(1); }
-elsif ($opt{apply}) { do_apply(0, defined $opt{force}); }
-else { pod2usage( -verbose => 1 ); }
+if ($opt{test}) {
+ do_apply(1);
+} elsif ($opt{apply}) {
+ do_apply(0, defined $opt{force});
+} else {
+ pod2usage( -verbose => 1 );
+}
sub do_apply {
my ($test_mode, $force) = @_;
Please sign in to comment.
Something went wrong with that request. Please try again.