summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2005-10-20 14:05:54 +0000
committerMystery Man <unknown@mandriva.org>2005-10-20 14:05:54 +0000
commit9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5 (patch)
treef3ef7ada2ce82dafb6d41cc087b0cc7fdfc40a46 /perl-install/any.pm
parent3e4ad5e1b687f262a1d7cc39a0b905a595ac7f95 (diff)
downloaddrakx-backup-do-not-use-9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5.tar
drakx-backup-do-not-use-9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5.tar.gz
drakx-backup-do-not-use-9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5.tar.bz2
drakx-backup-do-not-use-9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5.tar.xz
drakx-backup-do-not-use-9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5.zip
This commit was manufactured by cvs2svn to create tagV10_34_11_100mdk
'V10_34_11_100mdk'.
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm36
1 files changed, 23 insertions, 13 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 5eff5c9b2..1be4bd3ca 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -593,9 +593,9 @@ sub autologin {
my @wm = sessions();
my @users = map { $_->{name} } @{$o->{users} || []};
- if (member('KDE', @wm) && @users == 1 && $o->{meta_class} eq 'desktop') {
- $o->{desktop} = 'KDE';
- $o->{autologin} = $users[0];
+ if (!$::corporate && member('KDE', @wm) && @users == 1 && $o->{meta_class} eq 'desktop') {
+ $o->{desktop} = 'KDE';
+ $o->{autologin} = $users[0];
} elsif (@wm > 1 && @users && !$o->{authentication}{NIS} && $o->{security} <= 2) {
my $use_autologin = @users == 1;
@@ -623,17 +623,23 @@ sub selectLanguage {
if ($::isInstall) {
my $langs = $o_langs_ || {};
my $using_images = $in->isa('interactive::gtk') && !$in->{vga16};
-
- #- to create the default value, use the first location for that value :/
- $lang = if_(!$::move, first(lang::l2location($lang)).'|').$lang;
my %name2l = map { lang::l2name($_) => $_ } lang::list_langs();
my $listval2val = sub { $_[0] =~ /\|(.*)/ ? $1 : $_[0] };
- my @langs = map { my $l = $_; uniq_ { $_->[0] } map { [ $::move ? $l : "$_|$l", $_, $l ] } lang::l2location($l) } lang::list_langs();
#- since gtk version will use images (function image2f) we need to sort differently
my $sort_func = $using_images ? \&lang::l2transliterated : \&lang::l2name;
- @langs = map { $_->[0] } sort { $sort_func->($a->[2]) cmp $sort_func->($b->[2]) } @langs;
+ my @langs = sort { $sort_func->($a) cmp $sort_func->($b) } lang::list_langs();
+ if (@langs > 15) {
+ my $add_location = sub {
+ my ($l) = @_;
+ map { "$_|$l" } lang::l2location($l);
+ };
+ @langs = map { $add_location->($_) } @langs;
+
+ #- to create the default value, use the first location for that value :/
+ $lang = first($add_location->($lang));
+ }
my $last_utf8 = $in->{locale}{utf8};
add2hash($common, { cancel => '',
@@ -841,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);
}
}
}