]> git.proxmox.com Git - pve-container.git/commitdiff
setup/debian: remove superfluous parameter
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 16 Oct 2015 07:44:22 +0000 (09:44 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 16 Oct 2015 07:46:53 +0000 (09:46 +0200)
The $new parameter only guards the output of the 'auto' line
which is now being tracked in $done_auto, so it's not
needed anymore.

src/PVE/LXC/Setup/Debian.pm

index da35494fcb42e5f50fe964411193a27211673796..4b423cc55e55e38e57a45478b77013c5bcb3f1b9 100644 (file)
@@ -118,14 +118,12 @@ sub setup_network {
     my $done_v6_hash = {};
 
     my $print_section = sub {
-       my ($new) = @_;
-
        return if !$section;
 
        my $ifname = $section->{ifname};
        my $net = $networks->{$ifname};
 
-       if ($new && !$done_auto->{$ifname}) {
+       if (!$done_auto->{$ifname}) {
            $interfaces .= "auto $ifname\n";
            $done_auto->{$ifname} = 1;
        }
@@ -247,12 +245,12 @@ sub setup_network {
        if (!$done_v4_hash->{$ifname} && defined($net->{address})) {
            if ($need_separator) { $interfaces .= "\n"; $need_separator = 0; };
            $section = { type => 'ipv4', ifname => $ifname, attr => []};
-           &$print_section(1);
+           &$print_section();
        }
        if (!$done_v6_hash->{$ifname} && defined($net->{address6})) {
            if ($need_separator) { $interfaces .= "\n"; $need_separator = 0; };
            $section = { type => 'ipv6', ifname => $ifname, attr => []};
-           &$print_section(1);
+           &$print_section();
        }
     }