[pve-devel] applied: [PATCH v4 pve-manager] API2 : Network : add network config reload

Dietmar Maurer dietmar at proxmox.com
Wed Oct 10 10:10:50 CEST 2018


> >>Please can you try to solve those issues marked as 'clean me'? 
> 
> I'm not sure what is the best/cleanest way to read/write and parse /etc/network/interfaces ?

I think the current way is OK, but we can improve
the error handling and pass the correct filename, i.e.

  #clean-me
  my $fh = IO::File->new("<$current_config_file");

check for errors here (what if open fails)

  my $running_config = PVE::INotify::read_etc_network_interfaces(1,$fh);

and pass the filename here:

my $running_config = PVE::INotify::read_etc_network_interfaces($current_config_file, $fh);




More information about the pve-devel mailing list