summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-05-28 08:21:15 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-05-28 08:21:15 +0000
commit7db099c14da7fde27be0cd6dbe0bf79183420a4f (patch)
tree646b1d606c8f0c60d18d54b43861e099a93c21cd /perl-install/any.pm
parentbb5d5f6f9a104490f1d4497a091d3ed9adac0ca2 (diff)
downloaddrakx-backup-do-not-use-7db099c14da7fde27be0cd6dbe0bf79183420a4f.tar
drakx-backup-do-not-use-7db099c14da7fde27be0cd6dbe0bf79183420a4f.tar.gz
drakx-backup-do-not-use-7db099c14da7fde27be0cd6dbe0bf79183420a4f.tar.bz2
drakx-backup-do-not-use-7db099c14da7fde27be0cd6dbe0bf79183420a4f.tar.xz
drakx-backup-do-not-use-7db099c14da7fde27be0cd6dbe0bf79183420a4f.zip
merge fixes from HEAD
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index d3bd72065..a17442dae 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -847,22 +847,26 @@ Allowing this will permit users to simply click on \"Share\" in konqueror and na
my $custom = $r eq $l[2];
if ($r ne $l[0]) {
#- verify we can export in $type
- my %type2file = (nfs => [ 'nfs-utils', '/etc/init.d/nfs' ], smb => [ 'samba-server', '/etc/init.d/smb' ]);
+ my %type2service = (nfs => [ 'nfs-utils', 'nfs' ], smb => [ 'samba-server', 'smb' ]);
my %l;
if ($type) {
%l = ($type => 1);
} else {
- %l = map_each { $::a => -e $::b->[1] } %type2file;
+ %l = map_each { $::a => -e $::b->[1] } %type2service;
$in->ask_from('', N("You can export using NFS or Samba. Please select which you'd like to use."),
[ map { { text => $_, val => \$l{$_}, type => 'bool' } } keys %l ]) or return;
}
foreach (keys %l) {
- my ($pkg, $file) = @{$type2file{$_}} or die "unknown type $_\n";
+ my ($pkg, $service) = @{$type2service{$_}} or die "unknown type $_\n";
+ my $file = "/etc/init.d/$service";
+ require services;
if ($l{$_}) {
$in->do_pkgs->ensure_is_installed($pkg, $file) or return;
+ services::start($service);
+ services::start_service_on_boot($service);
} elsif (-e $file) {
- $in->ask_okcancel('', N("The package %s is going to be removed.", $pkg), 1) or return;
- $in->do_pkgs->remove($pkg);
+ services::stop($service);
+ services::do_not_start_service_on_boot($service);
}
}
}