diff options
Diffstat (limited to 'perl-install/standalone/lsnetdrake')
| -rwxr-xr-x | perl-install/standalone/lsnetdrake | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/perl-install/standalone/lsnetdrake b/perl-install/standalone/lsnetdrake index 9865cee27..39d8d3337 100755 --- a/perl-install/standalone/lsnetdrake +++ b/perl-install/standalone/lsnetdrake @@ -1,8 +1,11 @@ #!/usr/bin/perl use lib qw(/usr/lib/libDrakX); -use network::nfs; -use network::smb; +use standalone; +use fs::remote::nfs; +use fs::remote::smb; +use MDK::Common::Func qw(if_); +#use interactive; # if we'd want lsnetdrake to install missing pkgs "@ARGV" =~ /-h/ and die "usage: lsnetdrake [-h] [--nfs] [--smb]\n"; @@ -12,13 +15,10 @@ 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 $server (sort_names($class->find_servers)) { - foreach (sort_names($class->find_exports($server))) { +foreach my $class (if_($nfs, fs::remote::nfs->new), if_($smb, fs::remote::smb->new)) { + #$class->check(interactive->vnew) if -t *STDIN && -t *STDOUT; # Only if tty. TO DO IN INTERACTIVE-vnew instead?t + foreach my $server (sort_names(eval { $class->find_servers })) { + foreach (sort_names(eval { $class->find_exports($server) })) { print $class->to_fullstring($_), "\n"; } } |
