#!/usr/bin/perl use lib qw(/usr/lib/libDrakX); use network::smb; use network::nfs; "@ARGV" =~ /-h/ and die "usage: lsnetdrake [-h] [--nfs] [--smb]\n"; my $nfs = !@ARGV || "@ARGV" =~ /-(nfs)/; my $smb = !@ARGV || "@ARGV" =~ /-(smb)/; $| = 1; $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; if ($nfs) { my @servers = network::nfs::find_servers(); foreach my $server (sort_names(@servers)) { my $server_name = $server->{name} || $server->{ip}; foreach (sort_names(network::nfs::find_exports($server))) { print "$server_name:$_->{name}", $_->{comment} && " ($_->{comment})", "\n"; } } } if ($smb) { my @servers = network::smb::find_servers(); foreach my $server (sort_names(@servers)) { my $server_name = $server->{name} || $server->{ip}; foreach (sort_names(network::smb::find_exports($server))) { print "//$server_name/$_->{name}", $_->{comment} && " ($_->{comment})", "\n"; } } } sub sort_names { sort { $a->{name} cmp $b->{name} } @_; } 2008.0 Mageia Installer and base platform for many utilitiesThierry Vignaud [tv]
summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2005-06-17 07:43:54 +0000
committerPablo Saratxaga <pablo@mandriva.com>2005-06-17 07:43:54 +0000
commitf2bc5ef228d0a7aaca765958e7b34d3732295c67 (patch)
tree378751dfaa24e06305ad3cff1aa21b784de0719c /perl-install
parent3cdbd90b9fce6be31eaf08b8e1aceb410e0e95ee (diff)
downloaddrakx-f2bc5ef228d0a7aaca765958e7b34d3732295c67.tar
drakx-f2bc5ef228d0a7aaca765958e7b34d3732295c67.tar.gz
drakx-f2bc5ef228d0a7aaca765958e7b34d3732295c67.tar.bz2
drakx-f2bc5ef228d0a7aaca765958e7b34d3732295c67.tar.xz
drakx-f2bc5ef228d0a7aaca765958e7b34d3732295c67.zip
updated pot file
Diffstat (limited to 'perl-install')