Author: locilka
Date: Tue Aug 21 16:51:13 2007
New Revision: 40381
URL: http://svn.opensuse.org/viewcvs/yast?rev=40381&view=rev
Log:
- Added ssh_host_dsa_key ssh_host_dsa_key.pub ssh_host_rsa_key
ssh_host_rsa_key.pub to be optionally copied as well as the SSH1
keys (#298798).
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_pre_install.ycp
trunk/installation/src/modules/SystemFilesCopy.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=40381&r1=40380&r2=40381&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Tue Aug 21 16:51:13 2007
@@ -3,6 +3,9 @@
- Fixed evaluating of "enabled" tag in map of repositories in
inst_upgrade_urls (#300901).
+- Added ssh_host_dsa_key ssh_host_dsa_key.pub ssh_host_rsa_key
+ ssh_host_rsa_key.pub to be optionally copied as well as the SSH1
+ keys (#298798).
- 2.15.43
-------------------------------------------------------------------
Modified: trunk/installation/src/clients/inst_pre_install.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_pre_install.ycp?rev=40381&r1=40380&r2=40381&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_pre_install.ycp (original)
+++ trunk/installation/src/clients/inst_pre_install.ycp Tue Aug 21 16:51:13 2007
@@ -10,7 +10,7 @@
define map > FindTheBestFiles (map > files_found);
- define void FindAndCopyNewestFiles (string copy_to, list <string> wanted_files);
+ define void FindAndCopyNewestFiles (string copy_to, list <string> wanted_files, list <string> optional_files);
// --> Variables
@@ -25,12 +25,19 @@
Initialize();
// FATE #300421: Import ssh keys from previous installations
- FindAndCopyNewestFiles("/", ["/etc/ssh/ssh_host_key", "/etc/ssh/ssh_host_key.pub"]);
+ FindAndCopyNewestFiles (
+ "/",
+ // required
+ ["/etc/ssh/ssh_host_key", "/etc/ssh/ssh_host_key.pub"],
+ // optional
+ ["/etc/ssh/ssh_host_dsa_key", "/etc/ssh/ssh_host_dsa_key.pub", "/etc/ssh/ssh_host_rsa_key", "/etc/ssh/ssh_host_rsa_key.pub"]
+ );
// FATE #120103: Import Users From Existing Partition
- FindAndCopyNewestFiles(
+ FindAndCopyNewestFiles (
sformat ("%1/imported/userdata", Directory::vardir),
- ["/etc/shadow", "/etc/passwd", "/etc/login.defs", "/etc/group"]
+ ["/etc/shadow", "/etc/passwd", "/etc/login.defs", "/etc/group"],
+ []
);
// free the memory
@@ -84,7 +91,7 @@
return ret;
}
- define void FindAndCopyNewestFiles (string copy_to, list <string> wanted_files) {
+ define void FindAndCopyNewestFiles (string copy_to, list <string> wanted_files, list <string> optional_files) {
y2milestone("Searching for files: %1", wanted_files);
string mnt_tmpdir = Directory::tmpdir + "/tmp_mnt_for_check";
@@ -175,7 +182,10 @@
foreach (string partition, map files, ic_winner, {
SystemFilesCopy::CopyFilesToTemp (
partition,
- maplist (string filename, integer filetime, files, { return filename; }),
+ (list <string>) union (
+ maplist (string filename, integer filetime, files, { return filename; }),
+ optional_files
+ ),
copy_to
);
});
Modified: trunk/installation/src/modules/SystemFilesCopy.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/modules/SystemFilesCopy.ycp?rev=40381&r1=40380&r2=40381&view=diff
==============================================================================
--- trunk/installation/src/modules/SystemFilesCopy.ycp (original)
+++ trunk/installation/src/modules/SystemFilesCopy.ycp Tue Aug 21 16:51:13 2007
@@ -155,7 +155,8 @@
// archive files were already quoted
string command = sformat (
- "cd '%1'; tar -zcvf '%2' %3",
+ // 'ignore failed read' is for optional files
+ "cd '%1'; tar -zcvf --ignore-failed-read '%2' %3",
tmp_mount_directory, String::Quote(archive_name), archive_files
);
map cmd_run = (map) SCR::Execute(.target.bash_output, command);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org