You can modify the configuration file to copy or install custom scripts onto newly provisioned machines. The Linux agent runs the scripts at the specified point in the workflow.

Before you begin

About this task

Your script can reference any of the ./properties.xml files in the /usr/share/gugent/site/workitem directories.

Procedure

  1. Create or identify the script you want to use.
  2. Save the script as NN_scriptname.

    NN is a two digit number. Scripts are executed in order from lowest to highest. If two scripts have the same number, the order is alphabetical based on scriptname.

  3. Make your script executable.
  4. Locate the post-installation section of your kickstart or autoYaST configuration file.

    In kickstart, this is indicated by %post. In autoYaST, this is indicated by post-scripts.

  5. Modify the post-installation section of the configuration file to copy or install your script into the /usr/share/gugent/site/workitem directory of your choice.

    Custom scripts are most commonly run for virtual kickstart/autoYaST with the work items SetupOS (for create provisioning) and CustomizeOS (for clone provisioning), but you can run scripts at any point in the workflow.

    For example, you can modify the configuration file to copy the script 11_addusers.sh to the /usr/share/gugent/site/SetupOS directory on a newly provisioned machine by using the following command:

    cp nfs:172.20.9.59/linuxscripts/11_addusers.sh /usr/share/gugent/site/SetupOS

Results

The Linux agent runs the script in the order specified by the work item directory and the script file name.