diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-05-19 13:16:19 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-05-19 13:16:19 +0000 |
commit | 55e98190ab6057f82cfee6631198c4b759fd4f69 (patch) | |
tree | c88e450f7c6cfdbc63b21932389fe22fbf7a6bad /perl-install/standalone | |
parent | 28c7d782d296945f1df60401d57d298ecec21bbb (diff) | |
download | drakx-backup-do-not-use-55e98190ab6057f82cfee6631198c4b759fd4f69.tar drakx-backup-do-not-use-55e98190ab6057f82cfee6631198c4b759fd4f69.tar.gz drakx-backup-do-not-use-55e98190ab6057f82cfee6631198c4b759fd4f69.tar.bz2 drakx-backup-do-not-use-55e98190ab6057f82cfee6631198c4b759fd4f69.tar.xz drakx-backup-do-not-use-55e98190ab6057f82cfee6631198c4b759fd4f69.zip |
simplify
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/lsnetdrake | 7 |
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"; |