diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-14 12:21:32 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-14 12:21:32 +0000 |
commit | a2849d2425633eabb21fec8c5903f92b32b7fd79 (patch) | |
tree | 63de9c08169f66c8c5b4e772866d3dfb743ed4fa /lib/network/drakconnect.pm | |
parent | 8c9ffb777f3f6310b87d27f32fa7fba0951ac4fe (diff) | |
download | drakx-net-a2849d2425633eabb21fec8c5903f92b32b7fd79.tar drakx-net-a2849d2425633eabb21fec8c5903f92b32b7fd79.tar.gz drakx-net-a2849d2425633eabb21fec8c5903f92b32b7fd79.tar.bz2 drakx-net-a2849d2425633eabb21fec8c5903f92b32b7fd79.tar.xz drakx-net-a2849d2425633eabb21fec8c5903f92b32b7fd79.zip |
move --skip-wizard part in new network::drakconnect::edit
Diffstat (limited to 'lib/network/drakconnect.pm')
-rw-r--r-- | lib/network/drakconnect.pm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/network/drakconnect.pm b/lib/network/drakconnect.pm index 48db245..dbe2693 100644 --- a/lib/network/drakconnect.pm +++ b/lib/network/drakconnect.pm @@ -1,7 +1,24 @@ package network::drakconnect; +use common; + sub apply() { network::network::configure_network($net, $in, $modules_conf); } +sub get_intf_ip { + my ($interface) = @_; + my ($ip, $state, $mask); + if (-x "/sbin/ifconfig") { + local $_ = `LC_ALL=C LANGUAGE=C /sbin/ifconfig $interface`; + $ip = /inet addr:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/mso ? $1 : N("No IP"); + $mask = /Mask:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/mso ? $1 : N("No Mask"); + $state = /inet/ ? N("up") : N("down"); + } else { + $ip = $net->{ifcfg}{$interface}{IPADDR}; + $state = "n/a"; + } + ($ip, $state, $mask); +} + 1; |