diff options
Diffstat (limited to 'perl-install/standalone/lsnetdrake')
-rwxr-xr-x | perl-install/standalone/lsnetdrake | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/perl-install/standalone/lsnetdrake b/perl-install/standalone/lsnetdrake deleted file mode 100755 index 1b2885092..000000000 --- a/perl-install/standalone/lsnetdrake +++ /dev/null @@ -1,36 +0,0 @@ -#!/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} } @_; -} |