Author: jsuchome
Date: Mon Apr 14 16:06:23 2008
New Revision: 46588
URL: http://svn.opensuse.org/viewcvs/yast?rev=46588&view=rev
Log:
- use SystemFilesCopy::CopyFilesToSystem to acquire /etc/passwd
and /etc/shadow in the 1st stage (fate#302980)
- show imported users in installation summary
- 2.16.25
Modified:
trunk/users/VERSION
trunk/users/package/yast2-users.changes
trunk/users/src/inst_user_first.ycp
trunk/users/src/users_proposal.ycp
Modified: trunk/users/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/VERSION?rev=46588&r1=46587&r2=46588&view=diff
==============================================================================
--- trunk/users/VERSION (original)
+++ trunk/users/VERSION Mon Apr 14 16:06:23 2008
@@ -1 +1 @@
-2.16.24
+2.16.25
Modified: trunk/users/package/yast2-users.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/package/yast2-users.changes?rev=46588&r1=46587&r2=46588&view=diff
==============================================================================
--- trunk/users/package/yast2-users.changes (original)
+++ trunk/users/package/yast2-users.changes Mon Apr 14 16:06:23 2008
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Mon Apr 14 15:54:26 CEST 2008 - jsuchome@suse.cz
+
+- use SystemFilesCopy::CopyFilesToSystem to acquire /etc/passwd
+ and /etc/shadow in the 1st stage (fate#302980)
+- show imported users in installation summary
+- 2.16.25
+
+-------------------------------------------------------------------
Fri Apr 11 15:44:37 CEST 2008 - jsuchome@suse.cz
- prepare API for "Import User From Previous Installation" in
Modified: trunk/users/src/inst_user_first.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/src/inst_user_first.ycp?rev=46588&r1=46587&r2=46588&view=diff
==============================================================================
--- trunk/users/src/inst_user_first.ycp (original)
+++ trunk/users/src/inst_user_first.ycp Mon Apr 14 16:06:23 2008
@@ -9,6 +9,7 @@
{
import "Arch";
import "Directory";
+ import "FileUtils";
import "GetInstArgs";
import "Label";
import "Mode";
@@ -19,6 +20,7 @@
import "Progress";
import "Report";
import "String";
+ import "SystemFilesCopy";
import "UsersSimple";
import "Wizard";
@@ -37,7 +39,6 @@
// if importing users from different partition is possible
boolean import_available = false;
- string import_dir = Directory::vardir + "/imported/userdata/etc";
// full info about imported users
map imported_users = $[];
// user names of imported users
@@ -45,13 +46,16 @@
// names of imported users selected for writing
list<string> to_import = [];
- /*
- if (FileUtils::Exists (import_dir + "/passwd") &&
+ string tmp_dir = Directory::tmpdir + "/users";
+ SCR::Execute (.target.mkdir, tmp_dir);
+ string import_dir = tmp_dir + Directory::vardir +"/imported/userdata/etc";
+
+ if (SystemFilesCopy::CopyFilesToSystem (tmp_dir) &&
+ FileUtils::Exists (import_dir + "/passwd") &&
FileUtils::Exists (import_dir + "/shadow"))
{
import_available = true;
}
- */
if (!GetInstArgs::going_back() && import_available)
{
if (UsersSimple::ReadUserData (import_dir))
@@ -66,6 +70,8 @@
import_available = false;
}
}
+ SCR::Execute (.target.bash_output, sformat ("/bin/rm -rf %1", tmp_dir));
+
// helper function to se package for installation, together with
// architecture dependent version
void install_package (string package) {
@@ -586,7 +592,8 @@
);
foreach (symbol w, [`cn, `username, `pw1, `pw2, `root_pw, `root_mail,
`autologin ], {
- UI::ChangeWidget (`id (w), `Enabled, auth_method == "users");
+ UI::ChangeWidget (`id (w), `Enabled,
+ auth_method == "users" && to_import == []);
});
if (auth_method == "users")
UI::SetFocus (`id (`cn));
Modified: trunk/users/src/users_proposal.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/src/users_proposal.ycp?rev=46588&r1=46587&r2=46588&view=diff
==============================================================================
--- trunk/users/src/users_proposal.ycp (original)
+++ trunk/users/src/users_proposal.ycp Mon Apr 14 16:06:23 2008
@@ -52,7 +52,8 @@
// summary label <%1>-<%2> are HTML tags, leave untouched
string prop = sformat (_("No <%1>user<%2> configured"),ahref, "/a");
string auth_method = UsersSimple::AfterAuth ();
- map user = UsersSimple::GetUser ();
+ list<map> users = (list<map>) UsersSimple::GetUsers ();
+ map user = users[0]:$[];
if (auth_method != "users")
{
// summary line: <%1>-<%2> are HTML tags, leave untouched,
@@ -65,6 +66,18 @@
prop = sformat (_("<%1>Authentication method<%2>: %3 and Kerberos."),
ahref, "/a", auth2label[auth_method]:auth_method);
}
+ else if (size (users) > 1 || user["__imported"]:nil != nil)
+ {
+ list<string> to_import = maplist (map u, users, ``(u["uid"]:""));
+ // summary line, %3 are user names (comma separated)
+ // <%1>,<%2> are HTML tags, leave untouched,
+ prop = sformat (_("<%1>Users<%2> %3 selected for import"),
+ ahref, "/a", mergestring (to_import, ","));
+ if (size (to_import) == 1)
+ // summary line, <%1>,<%2> are HTML tags, %3 user name
+ prop = sformat (_("<%1>User<%2> %3 will be imported."),
+ ahref, "/a", to_import[0]:"");
+ }
else if (user["uid"]:"" != "")
{
// summary line: <%1>-<%2> are HTML tags, leave untouched,
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org