Functionality for copying files from another systems
List of Global Functions
CopyFilesToSystem - Proceeds the copying of all files in inst-sys (that were copied from another partition before) to the directory.
CopyFilesToTemp - Mounts the partition and proceeds the copying files from that partition to the inst-sys.
CreateDirectoryIfMissing - 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.
GetCopySystemFiles - Returns list of copy_files definitions
GetUseControlFileDef - Sets whether copy_files from control file should be used
SaveInstSysContent - Function reads <globals><save_instsys_content /></globals> from control file and copies all content from inst-sys to the just installed system.
SetCopySystemFiles - Sets new rules which files will be copied during installation.
SetUseControlFileDef - Sets whether to use copy_files from control file
List of Global Variables
Proceeds the copying of all files in inst-sys (that were copied from another partition before) to the directory.
Function parameters
string extract_to_dir
Return value
boolean
Mounts the partition and proceeds the copying files from that partition to the inst-sys.
Function parameters
string partition
list <string> filenames
string copy_to
Return value
boolean
copy_to == "/root/" (where to copy it to the installed system)
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.
Function parameters
string create_directory
Return value
string
Returns list of copy_files definitions
Return value
list <map>
See also:
SetCopySystemFiles for more info
Sets whether copy_files from control file should be used
Return value
boolean - whether to use them
See also:
SetUseControlFileDef
Function reads <globals><save_instsys_content /></globals> from control file and copies all content from inst-sys to the just installed system.
Return value
boolean
<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 new rules which files will be copied during installation.
Function parameters
list <map> new_copy_files
Return value
void
[ "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 ], ]
Example 138.
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"]] ])
See also:
FATE #305019: configure the files to copy from a previous installation