diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-19 15:32:35 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-19 15:32:35 +0000 |
commit | 33226b4e857ed5ddbe7f5615bf319622fb5efdae (patch) | |
tree | 1a56bf1a23e463636fa07cbbd48e8698ea7c124e /lib/network/tools.pm | |
parent | bb13d243eaf272ccf63ac57d4ea375aaf7a5eaf4 (diff) | |
download | drakx-net-33226b4e857ed5ddbe7f5615bf319622fb5efdae.tar drakx-net-33226b4e857ed5ddbe7f5615bf319622fb5efdae.tar.gz drakx-net-33226b4e857ed5ddbe7f5615bf319622fb5efdae.tar.bz2 drakx-net-33226b4e857ed5ddbe7f5615bf319622fb5efdae.tar.xz drakx-net-33226b4e857ed5ddbe7f5615bf319622fb5efdae.zip |
add has_network_connection helper
Diffstat (limited to 'lib/network/tools.pm')
-rw-r--r-- | lib/network/tools.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/network/tools.pm b/lib/network/tools.pm index 1d4df88..b00bdb0 100644 --- a/lib/network/tools.pm +++ b/lib/network/tools.pm @@ -199,6 +199,11 @@ sub get_default_connection { return $gw_intf, get_interface_status($gw_intf), $net->{resolv}{dnsServer}; } +sub has_network_connection() { + (undef, undef, $gw_address) = get_default_connection({}); + to_bool($gw_address); +} + sub get_interface_type { my ($interface, $o_module) = @_; require detect_devices; |