summaryrefslogtreecommitdiffstats
path: root/lib/network/network.pm
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-08-17 14:34:52 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-08-17 14:34:52 +0000
commit5665dd4e9523df029f17019d7b64a9e2daf379ad (patch)
treea7bfdd7f809cb5d25d32dced8b3a30b6cb88a488 /lib/network/network.pm
parent6637448e6d3d4e50558dd8ecbd47b7abe66f29fc (diff)
downloaddrakx-net-5665dd4e9523df029f17019d7b64a9e2daf379ad.tar
drakx-net-5665dd4e9523df029f17019d7b64a9e2daf379ad.tar.gz
drakx-net-5665dd4e9523df029f17019d7b64a9e2daf379ad.tar.bz2
drakx-net-5665dd4e9523df029f17019d7b64a9e2daf379ad.tar.xz
drakx-net-5665dd4e9523df029f17019d7b64a9e2daf379ad.zip
Added netprofile_count function.
Diffstat (limited to 'lib/network/network.pm')
-rw-r--r--lib/network/network.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/network/network.pm b/lib/network/network.pm
index 59dd926..8161cbe 100644
--- a/lib/network/network.pm
+++ b/lib/network/network.pm
@@ -442,6 +442,11 @@ sub netprofile_list() {
map { if_(m!([^/]*)/$!, $1) } glob("$::prefix/etc/netprofile/profiles/*/");
}
+sub netprofile_count() {
+ my @profiles = netprofile_list();
+ return $#profiles;
+}
+
sub netprofile_read {
my ($net) = @_;
my $profile = cat_("$::prefix/etc/netprofile/current");