[pve-devel] [PATCH] add -full option to pve-firewall compile

Alexandre DERUMIER aderumier at odiso.com
Wed Jun 18 07:50:11 CEST 2014


>>Note: Above command always print stderr output. 

Oh, sorry, I didn't known, I thinked that error was not displayed by default

I'll send a new patch.

----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre Derumier" <aderumier at odiso.com>, pve-devel at pve.proxmox.com 
Envoyé: Mercredi 18 Juin 2014 05:59:46 
Objet: RE: [pve-devel] [PATCH] add -full option to pve-firewall compile 

Sorry, I don't really understand this patch. You suppress error 
here, instead of making output more verbose? 

> sub iptables_restore_cmdlist { 
> - my ($cmdlist) = @_; 
> + my ($cmdlist, $verbose) = @_; 
> 
> - run_command("/sbin/iptables-restore -n", input => $cmdlist); 

Note: Above command always print stderr output. 

> + my $errfunc = sub { 
> + return if !$verbose; 

Now you suppress errors until you run with $verbose. I want to see errors always. 

> + my $line = shift; 
> + print $line."\n"; 
> + }; 
> + 
> + run_command("/sbin/iptables-restore -n", errfunc => $errfunc, input 
> + => $cmdlist); 



More information about the pve-devel mailing list