YaST2 Developers Documentation: Installation

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

  • Directory
  • FileUtils
  • Installation
  • ProductFeatures
  • Stage
  • String

Structures

Global Functions

Local Variables

Local Functions

local copy_files_to_installed_system -> list <list <string> >

Structure [

     [ archive_name, copy_to ],
     [ "/tmp/archive_001.tgz", "/etc" ],
 ]
global CreateDirectoryIfMissing (string create_directory) -> string

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
local Initialize () -> boolean

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.

global CopyFilesToTemp (string partition, list <string> filenames, string copy_to) -> boolean

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
global CopyFilesToSystem (string extract_to_dir) -> boolean

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)
global SaveInstSysContent () -> boolean

Function reads from control file and copies all content from inst-sys to the just installed system.

This function needs to be called in the inst-sys (first stage) just before the disk is unmounted.

FATE #301937

Structure

 <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>