Application Packaging Developer's Guide

The preremove Removal Script

In the case of this driver example, it removes the links in /dev and runs the rem_drv command on the driver.

# Pre removal script for the sst driver
echo “Removing /dev entries”
/usr/bin/rm -f /dev/rsst*

echo “Deinstalling driver from the kernel”
SAVEBASE=$BASEDIR
BASEDIR=””; export BASEDIR
/usr/sbin/rem_drv sst
BASEDIR=$SAVEBASE; export BASEDIR

exit 

The script removes the /dev entries itself; the /devices entries are removed by the rem_drv command.