diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-11-25 02:21:17 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-11-25 02:21:17 +0000 |
commit | 7a08dbc23f114bf6b6eae275e21e63b6667a1b37 (patch) | |
tree | c99d2cf8a7c5e28215d574b7164de0a387004016 /perl-install/network.pm | |
parent | 949ab0f0941e3266d8ab79380399dfe6a0020aea (diff) | |
download | drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar.gz drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar.bz2 drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar.xz drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.zip |
no_comment
Diffstat (limited to 'perl-install/network.pm')
-rw-r--r-- | perl-install/network.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/perl-install/network.pm b/perl-install/network.pm index 9ddde836f..e471734bc 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -146,6 +146,11 @@ sub sethostname { syscall_('sethostname', $netc->{HOSTNAME}, length $netc->{HOSTNAME}) or log::l("sethostname failed: $!"); } +sub resolv($) { + my ($name) = @_; + is_ip($name) ? $name : join(".", unpack "C4", (gethostbyname $name)[4]); +} + sub dnsServers { my ($netc) = @_; grep { $_ } map { $netc->{$_} } qw(dnsServer dnsServer2 dnsServer3); |