summaryrefslogtreecommitdiffstats
path: root/perl-install/network.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network.pm')
-rw-r--r--perl-install/network.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/network.pm b/perl-install/network.pm
index 7dd3f9349..f37012892 100644
--- a/perl-install/network.pm
+++ b/perl-install/network.pm
@@ -120,7 +120,12 @@ sub guessHostname {
sub addDefaultRoute {
my ($netc) = @_;
- c::addDefaultRoute($netc->{gateway}) if $netc->{gateway} || !$::testing;
+ c::addDefaultRoute($netc->{GATEWAY}) if $netc->{GATEWAY};
+}
+
+sub sethostname {
+ my ($netc) = @_;
+ syscall_('sethostname', $netc->{HOSTNAME}, length $netc->{HOSTNAME}) or log::l("sethostname failed: $!");
}
sub dnsServers {
@@ -129,12 +134,8 @@ sub dnsServers {
}
sub getNet() {
- my @l = detect_devices::getNet();
- unless (@l) {
- modules::load_thiskind('net') or return;
- @l = detect_devices::getNet();
- }
- @l;
+ modules::load_thiskind('net');
+ detect_devices::getNet();
}
sub findIntf {