summaryrefslogtreecommitdiffstats
path: root/perl-install/network/smb.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-12-06 22:49:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-12-06 22:49:35 +0000
commit055f126b9b89f608979ddaf49da72763ba4e1271 (patch)
treed5c2a518b14803f64eb4ce76dd1d08af30a684aa /perl-install/network/smb.pm
parent5d37c95fb99cc731cd020bc4381955a613521bfc (diff)
downloaddrakx-055f126b9b89f608979ddaf49da72763ba4e1271.tar
drakx-055f126b9b89f608979ddaf49da72763ba4e1271.tar.gz
drakx-055f126b9b89f608979ddaf49da72763ba4e1271.tar.bz2
drakx-055f126b9b89f608979ddaf49da72763ba4e1271.tar.xz
drakx-055f126b9b89f608979ddaf49da72763ba4e1271.zip
ask before installing nfs-utils-clients or samba-client
Diffstat (limited to 'perl-install/network/smb.pm')
-rw-r--r--perl-install/network/smb.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/perl-install/network/smb.pm b/perl-install/network/smb.pm
index 02c107bd1..350399797 100644
--- a/perl-install/network/smb.pm
+++ b/perl-install/network/smb.pm
@@ -3,15 +3,23 @@ package network::smb;
use common;
use network::network;
+
sub check {
my ($in) = @_;
+
+ my $pkg = 'samba-client';
my $f = '/usr/bin/nmblookup';
- -e $f or $in->do_pkgs->install('samba-client');
- -e $f or $in->ask_warn('', "Mandatory package samba-client is missing"), return;
+ if (! -e $f) {
+ $in->ask_okcancel('', _("The package %s needs to be installed. Do you want to install it?", $pkg), 1) or return;
+ $in->do_pkgs->install($pkg);
+ }
+ if (! -e $f) {
+ $in->ask_warn('', _("Mandatory package %s is missing", $pkg));
+ return;
+ }
1;
}
-
sub find_servers() {
my (undef, @l) = `nmblookup "*"`;
s/\s.*\n// foreach @l;