summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-09-05 14:21:48 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-09-05 14:21:48 +0000
commit44b596453c50044debba901575eb015045ae845d (patch)
tree478ad04ac879df73742947911a123b2e7bd82652 /perl-install/any.pm
parent25365fea641e9e5bcec2372695c9438d099b78eb (diff)
downloaddrakx-44b596453c50044debba901575eb015045ae845d.tar
drakx-44b596453c50044debba901575eb015045ae845d.tar.gz
drakx-44b596453c50044debba901575eb015045ae845d.tar.bz2
drakx-44b596453c50044debba901575eb015045ae845d.tar.xz
drakx-44b596453c50044debba901575eb015045ae845d.zip
no_comment
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm18
1 files changed, 4 insertions, 14 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index a74ce59a7..a81fece57 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -122,7 +122,7 @@ sub setupBootloader {
my $silo_install_lang = $silo_install_lang[$b->{use_partition}];
my @l = (
arch() =~ /sparc/ ? (
-_("Bootloader installation") => { val => \$silo_install_lang, list => \@silo_install_lang, not_edit => 1 },
+_("Bootloader installation") => { val => \$silo_install_lang, list => \@silo_install_lang },
) : (
_("Boot device") => { val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } @$hds, @$fstab), detect_devices::floppies() ], not_edit => !$::expert },
_("LBA (doesn't work on old BIOSes)") => { val => \$b->{lba32}, type => "bool", text => "lba" },
@@ -236,19 +236,9 @@ _("Default") => { val => \$default, type => 'bool' },
}
sub setAutologin {
- my ($prefix, $user, $wm, $exe, $flag) = @_;
- my $f = "$prefix/etc/sysconfig/autologin";
- my $t1 = "USER=";
- my $t2 = "EXEC=";
- my $t3 = "AUTOLOGIN=";
- $wm=uc($wm);
- substInFile { s/^(\Q$t1\E|\Q$t2\E|\Q$t3\E).*\n//; $_ .= "$t1$user\n$t2$exe\n$t3=$flag" if eof } $f;
- `chmod 644 $f`;
- local *F;
- open F, ">$prefix/etc/sysconfig/desktop" or die "Can't open $!";
- print F <<END;
-$wm
-END
+ my ($prefix, $user) = @_;
+ setVarsInSh("$prefix/etc/sysconfig/autologin",
+ { USER => $user, AUTOLOGIN => bool2yesno($user), EXEC => "/usr/X11R6/bin/startx" });
}