diff options
author | damien <damien@mandriva.com> | 2000-09-14 15:34:42 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2000-09-14 15:34:42 +0000 |
commit | 5bbff1ee25e40ae62bcd8883248ebc249db260f7 (patch) | |
tree | 4e75abba8a7b98abdf54337043b53f1f4a98238f /perl-install | |
parent | 3c4c523148bf1ac9366d0bb527c71e69bb1eff2b (diff) | |
download | drakx-5bbff1ee25e40ae62bcd8883248ebc249db260f7.tar drakx-5bbff1ee25e40ae62bcd8883248ebc249db260f7.tar.gz drakx-5bbff1ee25e40ae62bcd8883248ebc249db260f7.tar.bz2 drakx-5bbff1ee25e40ae62bcd8883248ebc249db260f7.tar.xz drakx-5bbff1ee25e40ae62bcd8883248ebc249db260f7.zip |
updated
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 8500c7ed7..fa19cae21 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -237,29 +237,12 @@ _("Default") => { val => \$default, type => 'bool' }, sub setAutologin { my ($prefix, $user, $desktop) = @_; - $user and do { + if ($user) { local *F; - open F, ">$prefix/home/$user/.wmrc" or die "Can't open $!"; - print F $desktop; + open F, ">$prefix/etc/sysconfig/desktop" or die "Can't open $!"; + print F uc($desktop); close F; - }; - my @wm = (qw(gnome ice maker kde after fvwm fvwm2 fvwm95 mwm twm enligh xfce blackbox sawfish)); - my @wm2 = (qw(gnome-session icewm wmaker kdestart afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce blackbox sawfish)); - my $i=0; - foreach (@wm) { - lc($desktop) =~ /$_/ and $desktop = $wm2[$i] and last; - $i++; } - my $f = "$prefix/home/$user/.xinitrc"; - -e $f or do { - open F, ">$f" or die "Can't open $!"; - print F "# Mandrake-Autologin : if you remove this comment, I won't ever edit this file."; - close F; }; - cat_($f) =~ /^# Mandrake-Autologin.*\n/ and do { - substInFile { - s/^exec .*\n//; - $_ = "exec $desktop\n" . $_ if eof; - } "$prefix/home/$user/.xinitrc"; }; setVarsInSh("$prefix/etc/sysconfig/autologin", { USER => $user, AUTOLOGIN => bool2yesno($user), EXEC => "/usr/X11R6/bin/startx" }); } |