4.10. Custom user scripts

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:

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