AutoYaST: Automatic Linux Installation and Configuration with YaST2 | ||
---|---|---|
<<< Previous | Chapter 4. Configuration and Installation Options | Next >>> |
By adding scripts to the auto-installation process you can customize the installation for your needs and take control in different stages of the installation.
In the auto-installation process, three types of scripts can be executed:
Pre-Install Scripts
Executed before YaST2 does any real change to the system (Before partitioning and package installation)
![]() | Pre-Install Scripts with confirmation |
---|---|
Pre-scripts are executed at an early stage of the installation. This means if you have requested to confirm the installation, the pre-scripts will be executed before the confirmation screen shows up. (profile/install/general/mode/confirm) |
Post-Install Scripts
These scripts are executed after YaST2 has completed the installation and after it has booted the system the first time.
Chroot environment post-install scripts
Chroot scripts are executed after all packages have been installed before YaST2 boots for the first time and before the boot loader is installed. Although the name of this type of scripts might imply that the scripts executed in the chroot environment, the scripts are actually executed in the system before its mounted. To make any changes to the system, the prefix /mnt has to be used to any path.
All but the pre-install scripts can be written in either shell or perl script language. When added to the control file manually, the scripts have to be included in a CDATA element to avoid confusion with the file syntax and other tags defined in the control file.
Example 4-34. Post script configuration
<scripts> .... <post-scripts config:type="list" > <script> <filename>post.sh</filename> <interpreter>shell</interpreter> <source> <![CDATA[ #!/bin/sh echo "Do something usefull" ]]> </source> </script> </post-scripts> <pre-scripts> ..... </pre-scripts> ... </scripts> |
After installation is finished, the scripts and the output logs can be found in the directory /var/adm/autoinstall. The scripts are located in scripts and the output logs of the scripts are located in the log directory.
The log is the output resulting when executing the shell scripts using the following command:
/bin/sh -x <script_name> 2&> /var/adm/autoinstall/logs/<script_name>.log |
<<< Previous | Home | Next >>> |
Users | Up | System variables (Sysconfig) |