]> git.proxmox.com Git - pve-firewall.git/commitdiff
use input parameter to feed iptables-restore
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 13 Feb 2014 11:37:50 +0000 (12:37 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 13 Feb 2014 11:37:50 +0000 (12:37 +0100)
PVE/Firewall.pm

index 19314ad5da3cd1659fbceb4c620f731d1804996c..8d56ab04a927e24e7a21d6ac04158d19b86bb6c5 100644 (file)
@@ -152,7 +152,7 @@ sub iptables_restore {
 
     my $cmdlist = join("\n", @ruleset);
 
-    run_command("echo '$cmdlist' | /sbin/iptables-restore -n", outfunc => sub {});
+    run_command("/sbin/iptables-restore -n", input => $cmdlist, outfunc => sub {});
 }
 
 sub iptables_addrule {