[yast-commit] r51827 - in /trunk/users: VERSION package/yast2-users.changes src/Users.pm src/UsersSimple.pm src/widgets.ycp
Author: jsuchome Date: Fri Oct 3 12:33:02 2008 New Revision: 51827 URL: http://svn.opensuse.org/viewcvs/yast?rev=51827&view=rev Log: - added autoYaST support for autologin (bnc#430111) - UsersSimple: import Stage module before using it (bnc#431890) - 2.17.14 Modified: trunk/users/VERSION trunk/users/package/yast2-users.changes trunk/users/src/Users.pm trunk/users/src/UsersSimple.pm trunk/users/src/widgets.ycp Modified: trunk/users/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/VERSION?rev=51827&r1=51826&r2=51827&view=diff ============================================================================== --- trunk/users/VERSION (original) +++ trunk/users/VERSION Fri Oct 3 12:33:02 2008 @@ -1 +1 @@ -2.17.13 +2.17.14 Modified: trunk/users/package/yast2-users.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/package/yast2-users.changes?rev=51827&r1=51826&r2=51827&view=diff ============================================================================== --- trunk/users/package/yast2-users.changes (original) +++ trunk/users/package/yast2-users.changes Fri Oct 3 12:33:02 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Oct 3 12:26:07 CEST 2008 - jsuchome@suse.cz + +- added autoYaST support for autologin (bnc#430111) +- UsersSimple: import Stage module before using it (bnc#431890) +- 2.17.14 + +------------------------------------------------------------------- Fri Sep 19 14:28:21 CEST 2008 - jsuchome@suse.cz - detect authentication methods also in 2nd stage (bnc#427256) Modified: trunk/users/src/Users.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/src/Users.pm?rev=51827&r1=51826&r2=51827&view=diff ============================================================================== --- trunk/users/src/Users.pm (original) +++ trunk/users/src/Users.pm Fri Oct 3 12:33:02 2008 @@ -6085,12 +6085,30 @@ %useradd_defaults = %{$settings{"user_defaults"}}; $defaults_modified = 1; } + if (defined $settings{"login_settings"} && + ref ($settings{"login_settings"}) eq "HASH") + { + my $autologin = $settings{"login_settings"}; + my $auto_user = $autologin->{"autologin_user"} || ""; + if ($auto_user) { + Autologin->Use (1); + Autologin->user ($auto_user); + } + if (defined $autologin->{"password_less_login"}) { + Autologin->pw_less ($autologin->{"password_less_login"}); + } + } $self->ReadSystemDefaults(1); # remove cache entries (#50265) UsersCache->ResetCache (); + # do not replace possible sysconfig value of autologin (bnc#430111) + if (Mode->autoinst ()) { + Autologin->Read (); + } + my $error_msg = Mode->test () ? "" : $self->ReadLocal (); if ($error_msg) { return 0; @@ -6402,7 +6420,7 @@ foreach my $key (keys %exported_user) { if (defined $keys_to_export{$key}) { my $new_key = $keys_to_export{$key}; - $ret{$new_key} = $exported_user{$key}; + $ret{$new_key} = $exported_user{$key} if defined ($exported_user{$key}); } } @@ -6501,11 +6519,20 @@ } } - return { + my %ret = ( "users" => \@exported_users, "groups" => \@exported_groups, "user_defaults" => \%useradd_defaults - }; + ); + if (Autologin->used ()) { + my %autologin = (); + if (Autologin->pw_less ()) { + $autologin{"password_less_login"} = YaST::YCP::Boolean (1); + } + $autologin{"autologin_user"} = Autologin->user (); + $ret{"login_settings"} = \%autologin; + } + return \%ret; } ##------------------------------------ @@ -6537,6 +6564,13 @@ } } } + if (Autologin->used ()) { + # summary label + $ret .= __("<h3>Login Settings</h3>"); + # summary item, %1 is user name + $ret .= sformat (__("User %1 configured for automatic login"), + Autologin->user ()); + } return $ret; } Modified: trunk/users/src/UsersSimple.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/src/UsersSimple.pm?rev=51827&r1=51826&r2=51827&view=diff ============================================================================== --- trunk/users/src/UsersSimple.pm (original) +++ trunk/users/src/UsersSimple.pm Fri Oct 3 12:33:02 2008 @@ -114,6 +114,7 @@ YaST::YCP::Import ("InstExtensionImage"); YaST::YCP::Import ("ProductControl"); YaST::YCP::Import ("SCR"); +YaST::YCP::Import ("Stage"); YaST::YCP::Import ("SystemFilesCopy"); YaST::YCP::Import ("UsersUI"); Modified: trunk/users/src/widgets.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/src/widgets.ycp?rev=51827&r1=51826&r2=51827&view=diff ============================================================================== --- trunk/users/src/widgets.ycp (original) +++ trunk/users/src/widgets.ycp Fri Oct 3 12:33:02 2008 @@ -996,18 +996,18 @@ define list GetExpertList () ``{ list expert_list = []; + if (Autologin::available) + { + expert_list = add (expert_list, + // menubutton label + `item(`id(`autologinconf), _("&Login Settings"))); + } if (!Mode::config ()) { - expert_list = merge (expert_list, [ + expert_list = prepend (expert_list, // menubutton label - `item(`id(`enc), _("Password &Encryption")), - ]); - if (Autologin::available) - { - expert_list = add (expert_list, - // menubutton label - `item(`id(`autologinconf), _("&Login Settings"))); - } + `item (`id(`enc), _("Password &Encryption")) + ); if (!Stage::cont ()) { expert_list = add (expert_list, -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsuchome@svn.opensuse.org