diff options
Diffstat (limited to 'lib/network/connection/ethernet.pm')
-rw-r--r-- | lib/network/connection/ethernet.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm index 47056bb..87c4e69 100644 --- a/lib/network/connection/ethernet.pm +++ b/lib/network/connection/ethernet.pm @@ -112,8 +112,8 @@ sub guess_protocol { sub guess_address_settings { my ($self) = @_; $self->{address}{dhcp_client} ||= find { -x "$::prefix/sbin/$_" } @dhcp_clients; - $self->{address}{peerdns} = 1 if !defined $self->{address}{peerdns}; - $self->{address}{peeryp} = 1 if !defined $self->{address}{peeryp}; + $self->{address}{peerdns} //= 1; + $self->{address}{peeryp} //= 1; $self->supplement_address_settings; } @@ -204,7 +204,7 @@ sub check_address_settings { sub guess_hostname_settings { my ($self) = @_; - $self->{address}{needhostname} = 0 if !defined $self->{address}{needhostname}; + $self->{address}{needhostname} //= 0; if (!defined $self->{address}{hostname}) { require network::network; my $network = network::network::read_conf($::prefix . $network::network::network_file); @@ -233,7 +233,7 @@ sub guess_control_settings { $self->network::connection::guess_control_settings($self); - $self->{control}{onboot} = 1 if !defined $self->{control}{onboot}; + $self->{control}{onboot} //= 1; $self->{control}{use_ifplugd} = !is_ifplugd_blacklisted($self->get_driver) if !defined $self->{control}{use_ifplugd}; } |