Safe Examples:
•lvlnboot
The lvlnboot command uses files on the inactive image.
•cat /etc/fstab grep
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
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
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
Unsafe Examples:
•/sbin/init.d/comsec stop
•setup_tftp
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-
setup_tftp
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.