Safe Examples:

lvlnboot –v

The lvlnboot command uses files on the inactive image.

cat /etc/fstab grep -e vxfs -e hfs grep " / " \ grep "/dev/vx/dsk" awk '{FS="/"; print $5}'

The preceding command can be used to determine if the system is installed on a VxVM disk group. The command looks for a file system mounted at “/”, checks for a prefix indicating VxVM, then uses awk to parse out the group name.

4.4Unsafe Logic in an Unconfigure Script

The unconfigure script is meant to reverse the steps performed by the configure script. However, though configure scripts have no DRD restrictions, unconfigure scripts, which run in the runcmd environment, are restricted to use DRD-safe logic. Unsafe logic in an unconfigure script must be modified to be safe (see examples above). If the logic cannot be made safe, it may be necessary to move the logic to a preremove script and provide a checkremove script that returns EXCLUDE when SW_SESSION_IS_DRD is set to 1.

During a drd runcmd swinstall operation, the configure script packaged with a fileset or product is run when the inactive system image is booted. Therefore, packagers can often put any control script code that is not DRD-compliant (DRD-safe), but must be run when the package is installed, into the configure script.

For example, creation of device files is often done in a configure script. This is because extracting the device driver’s major number must be extracted from the kernel of the system image where the device file is used.

In contrast, when drd runcmd swremove is executed, all remove control scripts in the package are run before the inactive image is booted. A mechanism is needed for executing control script code that is not DRD-compliant (DRD-safe), but is necessary for complete removal of the software.

Unsafe Examples:

/sbin/init.d/comsec stop

setup_tftp -d dirname

Suggested Resolution:

The mechanism that HP recommends is the creation of an rc script, usually run as S900 that will run once when the inactive image is booted, and then remove itself. This method is used by the Ignite- UX.BOOT-SERVICESfileset. In non-DRD environments, this fileset’s unconfigure script runs the command:

setup_tftp –d _directory_name

This command communicates with the tfptd service to remove certain Ignite directories from tftp access. This command cannot be run in a DRD session, because it would communicate with the daemon running on the booted system, thus removing tftp access to directories on the booted rather than inactive system image.