Installation |
modules/SystemFilesCopy.ycp |
Functionality for copying files from another systems | |
|
|
This module has an unstable interface. |
Functionality for copying files from any not-mounted systems
to inst-sys and from inst-sys to just-installed system.
Imports
Structures
Global Functions
Local VariablesLocal Functions |
Structure [
[ archive_name, copy_to ], [ "/tmp/archive_001.tgz", "/etc" ], ]
Checks whether the directory exists and creates it if it is missing If the path exists but it is not a directory, it tries to create another directory and returns its name. 'nil' is returned when everythig fails.
- Parameters:
-
create_directory
Sets and creates a temporary directory for files to lay in inst-sys until they're copied to the installed system. Sets and creates a temporary directory that is used for mounting partitions when copying files from them.
Mounts the partition and proceeds the copying files from that partition to the inst-sys.
Structure copy_to == "/root/" (where to copy it to the installed system)
- Parameters:
-
partition filenames copy_to
Proceeds the copying of all files in inst-sys (that were copied from another partition before) to the directory.
- Parameters:
-
extract_to_dir (Installation::destdir for initial stage of installation)
Function reads
This function needs to be called in the inst-sys (first stage) just before the disk is unmounted.
FATE #301937
<globals> <save_instsys_content config:type="list"> <save_instsys_item> <instsys_directory>/root/</instsys_directory> <system_directory>/root/inst-sys/</system_directory> </save_instsys_item> </save_instsys_content> </globals>
Sets whether copy_files from control file should be used
- Return value:
-
whether to use them
Sets whether to use copy_files from control file
- Parameters:
-
new_value
Returns list of copy_files definitions
Sets new rules which files will be copied during installation.
[ "copy_to_dir" : (string) "system_directory_to_copy_to", "mandatory_files" : (list <string>) [ list of mandatory files ], "optional_files" : (list <string>) [ list of optional files ], ]
- Parameters:
-
new_copy_files
- Example
-
SetCopySystemFiles ([ $["copy_to_dir":"/root/backup", "mandatory_files":["/etc/passwd", "/etc/shadow"]] $["copy_to_dir":"/root/backup", "mandatory_files":["/etc/ssh/ssh_host_dsa_key"], "optional_files":["/etc/ssh/ssh_host_rsa_key.pub"]] ])