Author: jsuchome Date: Mon Dec 1 15:58:07 2008 New Revision: 53782 URL: http://svn.opensuse.org/viewcvs/yast?rev=53782&view=rev Log: - do not open user dialogs in 2nd stage if user was configured before (bnc#450231) - check for network before checking for network methods (bnc#450469) - 2.17.27 Modified: trunk/users/VERSION trunk/users/package/yast2-users.changes trunk/users/src/UsersSimple.pm trunk/users/src/inst_user.ycp Modified: trunk/users/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/VERSION?rev=53782&r1=53... ============================================================================== --- trunk/users/VERSION (original) +++ trunk/users/VERSION Mon Dec 1 15:58:07 2008 @@ -1 +1 @@ -2.17.26 +2.17.27 Modified: trunk/users/package/yast2-users.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/package/yast2-users.changes... ============================================================================== --- trunk/users/package/yast2-users.changes (original) +++ trunk/users/package/yast2-users.changes Mon Dec 1 15:58:07 2008 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Mon Dec 1 15:51:14 CET 2008 - jsuchome@suse.cz + +- do not open user dialogs in 2nd stage if user was configured + before (bnc#450231) +- check for network before checking for network methods (bnc#450469) +- 2.17.27 + +------------------------------------------------------------------- Tue Nov 25 10:38:49 CET 2008 - jsuchome@suse.cz - installation: do not reset root password when modifying 1st user Modified: trunk/users/src/UsersSimple.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/src/UsersSimple.pm?rev=5378... ============================================================================== --- trunk/users/src/UsersSimple.pm (original) +++ trunk/users/src/UsersSimple.pm Mon Dec 1 15:58:07 2008 @@ -105,6 +105,9 @@ # prevent re-reading data map with 1st stage settingss my $first_stage_data_not_read = 1; +# note if users configuration should be run or skipped in 2nd stage (bnc#450231) +my $skip_user_creation = 0; + ##------------------------------------ ##------------------- global imports @@ -113,6 +116,7 @@ YaST::YCP::Import ("Hostname"); YaST::YCP::Import ("InstExtensionImage"); YaST::YCP::Import ("Mode"); +YaST::YCP::Import ("NetworkService"); YaST::YCP::Import ("ProductControl"); YaST::YCP::Import ("SCR"); YaST::YCP::Import ("Stage"); @@ -323,7 +327,18 @@ $run_krb_config = bool ($krb) if (defined $krb); } - +# note if users configuration should be run in 2nd stage +BEGIN { $TYPEINFO{SkipUserCreation} = ["function", "void", "boolean"];} +sub SkipUserCreation { + my ($self, $skip) = @_; + $skip_user_creation = bool ($skip); +} + +# return the value of skip_user_creation +BEGIN { $TYPEINFO{UserCreationSkipped} = ["function", "boolean"];} +sub UserCreationSkipped { + return bool ($skip_user_creation); +} ##------------------------------------ # Returns the map of user configured during installation @@ -1210,6 +1225,11 @@ return $network_methods_checked if $network_methods_checked; + if (!NetworkService->isNetworkRunning()) { + y2milestone ("network is not running, skipping network methods test"); + return 0; + } + my $call_extend = Stage->initial () && !Mode->live_installation (); if ($call_extend && !InstExtensionImage->LoadExtension ("bind", Modified: trunk/users/src/inst_user.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/src/inst_user.ycp?rev=53782... ============================================================================== --- trunk/users/src/inst_user.ycp (original) +++ trunk/users/src/inst_user.ycp Mon Dec 1 15:58:07 2008 @@ -33,6 +33,11 @@ list<map> users = []; map<string,any>user = $[]; + if (UsersSimple::UserCreationSkipped ()) + { + y2milestone ("preconfigured user already written..."); + return `auto; + } if (!GetInstArgs::going_back()) { Users::ReadSystemDefaults (false); @@ -50,6 +55,7 @@ }); } } + // what to call after inst_auth dialog string client = UsersSimple::AfterAuth(); @@ -95,6 +101,7 @@ y2error ("error while creating user: %1", error); Progress::set (progress_orig); UsersSimple::RemoveUserData (); + UsersSimple::SkipUserCreation (true); return `next; } if (Mode::normal ()) Wizard::CreateDialog (); // for testing only -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org