# Purpose: SUNWsnad package preremove script # Author: Dan Gordon # Creation date: 09/11/98 # # Details: # # After removal of package remove profiles, cryptorand, in.SafeHelper, and # restart the web server # # This script is meant to be run as part of the SUNWsnad package # de-installation. # PATH=/bin:/usr/bin:/sbin:/usr/sbin # Remove the /opt/SUNWstnr/platform/profiles directory and its profiles. Since they are # not created by the package the pkgrm won't remove them itself. rm -rf /opt/SUNWstnr/platform/profiles # Find the cryptorand process and kill it cryptpid=`ps -ef | grep cryptorand | grep -v grep | awk '{print $2}'` if [ -n "$cryptpid" ] then kill -9 $cryptpid fi # Remove the files (may have been) created by s/key usage rm -f /var/opt/SUNWstnr/skeykeys rm -f /var/opt/SUNWstnr/remfile.pins/* # Now take care of SafeHelper # clean out the system files cp -p /etc/inet/services /etc/inet/services+ grep -v "safehelp" /etc/inet/services+ > /etc/inet/services cp -p /etc/inet/inetd.conf /etc/inet/inetd.conf+ grep -v "safehelp" /etc/inet/inetd.conf+ > /etc/inet/inetd.conf # kick inetd (from Bill Soley's script ps -ef | awk '/^ *root .*[ /]inetd /{print "kill -HUP",$2}' | sh exit 0