diff options
author | damien <damien@mandriva.com> | 2000-08-04 15:23:47 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2000-08-04 15:23:47 +0000 |
commit | f093421759947c0e1020139c8b0bdb057105c074 (patch) | |
tree | 05bd8e206496af3b7f0e30ffa54f8c1925e8e292 /perl-install | |
parent | a3d551a6468bd1799197187d185689e3ac9cb4db (diff) | |
download | drakx-f093421759947c0e1020139c8b0bdb057105c074.tar drakx-f093421759947c0e1020139c8b0bdb057105c074.tar.gz drakx-f093421759947c0e1020139c8b0bdb057105c074.tar.bz2 drakx-f093421759947c0e1020139c8b0bdb057105c074.tar.xz drakx-f093421759947c0e1020139c8b0bdb057105c074.zip |
updated autologin.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ChangeLog | 5 | ||||
-rw-r--r-- | perl-install/Xconfigurator.pm | 44 | ||||
-rw-r--r-- | perl-install/any.pm | 8 |
3 files changed, 22 insertions, 35 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index 64b05d633..342646318 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,5 +1,10 @@ 2000-08-04 Pixel <pixel@mandrakesoft.com> + * any.pm (setAutoLogin): added this method to write xdm-config + * Xconfigurator.pm: clenead autologin code and use of above method + +2000-08-04 Pixel <pixel@mandrakesoft.com> + * pkgs.pm (setSelectedFromCompssList): save $nb to able to restore it in case of max_size reached. only purpose is the log! diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 08eabf1d4..f0f51c162 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -1094,41 +1094,15 @@ Would you like X to start when you reboot?"), 1); my %l; @l{@etc_pass_fields} = split ':'; $l{uid} > 500, $l{name}; } cat_("$o->{prefix}/etc/passwd"); - if (!(exists $o->{miscellaneous}{autologuser} || $::auto || !@users || exists $o->{authentication}{NIS} )) - { - if($in->ask_from_entries_refH(_("Autologin"), - _("I can set up your computer to automatically log on one user. + + !(exists $o->{miscellaneous}{autologuser} || $::auto || !@users || exists $o->{authentication}{NIS} ) && + $in->ask_from_entries_refH(_("Autologin"), +_("I can set up your computer to automatically log on one user. If you don't want to use this feature, click on the cancel button."), -[ _("Choose the default user :") => {val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1} ], )) { - my (@lines, $autoString, $autoUser); - open (F, "$prefix/etc/X11/xdm/xdm_config"); - foreach (<F>) { - /DisplayManager._0.autoUser/ and $autoUser=1; - /DisplayManager._0.autoString/ and $autoString=1; - } - close F; - if ( $autoUser) { - substInFile { - s/^(DisplayManager._0.autoUser):.*/$1:\t$o->{miscellaneous}{autologuser}/; - } "$prefix/etc/X11/xdm/xdm_config" - } else { - open F, ">>$prefix/etc/X11/xdm/xdm_config" or die "Can't append $prefix/etc/X11/xdm/xdm_config !"; - print F "\nDisplayManager._0.autoUser:\t$o->{miscellaneous}{autologuser}"; - close F; - } - if ( $autoString) { - substInFile { - s/^(DisplayManager._0.autoString):.*/$1:\tkde\n/; # Change it when /etc/wmsession.d is complete. - } "$prefix/etc/X11/xdm/xdm_config" - } else { - open F, ">>$prefix/etc/X11/xdm/xdm_config" or die "Can't append $prefix/etc/X11/xdm/xdm_config !"; - print F "\nDisplayManager._0.autoString:\tkde\n"; - close F; - } - # (dam's) : a patch for gdm is being done. - } - } - } - run_program::rooted($prefix, "chkconfig", "--del", "gpm") if $o->{mouse}{device} =~ /ttyS/ && !$::isStandalone; +[ _("Choose the default user :") => {val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1} ], ) + or delete $o->{miscellaneaous}{autologuser}; + set_autologin($prefix, $o->{miscellaneous}{autologuser}, "kde" ) if (@users && !exists $o->{authentication}{NIS} && exists $o->{miscellaneous}{autologuser}); + } + run_program::rooted($prefix, "chkconfig", "--del", "gpm") if $o->{mouse}{device} =~ /ttyS/ && !$::isStandalone; } } diff --git a/perl-install/any.pm b/perl-install/any.pm index 52b33a9ad..ec38ba7b1 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -199,4 +199,12 @@ _("Default") => { val => \$default, type => 'bool' }, 1; } +sub setAutologin { + my ($prefix, $user, $wm) = @_; + my $f="$prefix/etc/X11/xdm/xdm_config"; + substInFile { s/^(DisplayManager._0.autoUser).*\n//; $_ .= "DisplayManager._0.autoUser:\t$user\n" if eof } $f; + substInFile { s/^(DisplayManager._0.autoString).*\n//; $_ .= "DisplayManager._0.autoString:\t$wm\n" if eof } $f; + # (dam's) : a patch for gdm is being done. +} + 1; |