summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/lsnetdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-05-19 13:16:19 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-05-19 13:16:19 +0000
commit55e98190ab6057f82cfee6631198c4b759fd4f69 (patch)
treec88e450f7c6cfdbc63b21932389fe22fbf7a6bad /perl-install/standalone/lsnetdrake
parent28c7d782d296945f1df60401d57d298ecec21bbb (diff)
downloaddrakx-55e98190ab6057f82cfee6631198c4b759fd4f69.tar
drakx-55e98190ab6057f82cfee6631198c4b759fd4f69.tar.gz
drakx-55e98190ab6057f82cfee6631198c4b759fd4f69.tar.bz2
drakx-55e98190ab6057f82cfee6631198c4b759fd4f69.tar.xz
drakx-55e98190ab6057f82cfee6631198c4b759fd4f69.zip
simplify
Diffstat (limited to 'perl-install/standalone/lsnetdrake')
-rwxr-xr-xperl-install/standalone/lsnetdrake7
1 files changed, 2 insertions, 5 deletions
diff --git a/perl-install/standalone/lsnetdrake b/perl-install/standalone/lsnetdrake
index f08008aa4..d6233209d 100755
--- a/perl-install/standalone/lsnetdrake
+++ b/perl-install/standalone/lsnetdrake
@@ -4,6 +4,7 @@ use lib qw(/usr/lib/libDrakX);
use standalone;
use network::nfs;
use network::smb;
+use MDK::Common::Func qw(if_);
"@ARGV" =~ /-h/ and die "usage: lsnetdrake [-h] [--nfs] [--smb]\n";
@@ -13,11 +14,7 @@ my $smb = !@ARGV || "@ARGV" =~ /-(smb)/;
$| = 1;
$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
-my @l;
-push @l, network::nfs->new if $nfs;
-push @l, network::smb->new if $smb;
-
-foreach my $class (@l) {
+foreach my $class (if_($nfs, network::nfs->new), if_($smb, network::smb->new)) {
foreach my $server (sort_names($class->find_servers)) {
foreach (sort_names(eval { $class->find_exports($server) })) {
print $class->to_fullstring($_), "\n";