A begin script is a user-defined Bourne shell script, specified within the rules file, that performs tasks before the Trusted Solaris software is installed on the workstation. Begin scripts are used with custom JumpStart installations.
The following information is important to know about begin scripts:
Be careful that you do not specify something in the script that would prevent the mounting of file systems onto /a during an initial installation. If the Trusted Solaris installation program cannot mount the file systems onto /a, an error will occur and the installation will fail.
Begin scripts should be owned by root and have permissions equal to 644.
You could set up begin scripts to perform the following task:
Creating derived profiles
A derived profile is a profile that is dynamically created by a begin script during a custom JumpStart installation. Derived profiles are needed when you cannot set up the rules file to match specific workstations to a profile (when you need more flexibility than the rules file can provide). For example, you may need to use derived profiles for identical workstation models that have different hardware components (for example, workstations that have different frame buffers).
To set up a rule to use a derived profile, you must:
Set the profile field to an equal sign (=) instead of a profile.
Set the begin field to a begin script that will create a derived profile depending on which workstation is being installed.
When a workstation matches a rule with the profile field equal to an equal sign (=), the begin script creates the derived profile that is used to install the Trusted Solaris software on the workstation.
An example of a begin script that creates the same derived profile every time is shown below; however, you could add code to this example that would create a different derived profile depending on certain command's output.
#!/bin/sh echo "install_type initial_install" > ${SI_PROFILE} echo "system_type standalone" >> ${SI_PROFILE} echo "partitioning default" >> ${SI_PROFILE} echo "cluster SUNWCprog" >> ${SI_PROFILE} echo "package SUNWman delete" >> ${SI_PROFILE} echo "package SUNWolman delete" >> ${SI_PROFILE} echo "package SUNWxwman delete" >> ${SI_PROFILE}
As shown above, the begin script must use the SI_PROFILE environment variable for the name of the derived profile, which is set to /tmp/install.input by default.
If a begin script is used to create a derived profile, make sure there are no errors in it. A derived profile is not verified by the check script, because it is not created until the execution of the begin script.