#!/bin/sh # #ident "@(#)preremove 1.79 06/09/99 SMI" # # Copyright 06/09/99 Sun Microsystems, Inc. All Rights Reserved # # prepremove script for package: SUNWmhs1 # Exit codes for installation scripts e_ok=0 e_fatal=1 # stop installation on this exit e_warning=2 # Installation will go on. e_int=3 # Interrupted. Stop installation e_reboot=10 # User must reboot after installation of all selected packages e_rebootnow=20 # User must reboot right after installation of current package # To be added to one of the single-digit exit code above # Trap interrupt trap `exit $e_int` 15 AWK=/usr/bin/awk ECHO=/usr/bin/echo GREP=/usr/bin/grep PS=/usr/bin/ps WC=/usr/bin/wc CRONTAB=/usr/bin/crontab CP=/usr/bin/cp MV=/usr/bin/mv $BASEDIR/SUNWconn/ldap/lib/dsyppg if [ $? = 0 ] then echo "NIS plugin is still configured in LDAP server" echo "uninstalling would break the LDAP server" echo "please run $BASEDIR/SUNWconn/ldap/sbin/dsypinstall -u" exit 1 fi /etc/init.d/dsyp stop if [ -f /etc/rc2.d/S72dsyp ] then rm /etc/rc2.d/S72dsyp fi if [ -f /etc/opt/SUNWconn/ldap/current/nis.conf ] then echo "Saving current configuration file under <$BACKUPDIR>" mkdir -p $BACKUPDIR mkdir -p $BACKUPDIR/mapping (cd /etc/opt/SUNWconn/ldap/current; ${MV} nis.* $BACKUPDIR) (cd /etc/opt/SUNWconn/ldap/current/mapping; ${MV} nis.mapping $BACKUPDIR/mapping) fi rm -rf /var/opt/SUNWconn/ldap/yp/ rm -rf /var/yp/ldapsynch echo "\nPlease wait ...\c" echo ".\n" # # Remove DBM files generated by the NIS frontend. # rm -rf /var/opt/SUNWconn/ldap/nis/cache rm -f /var/opt/SUNWconn/ldap/admin/nis.* exit $e_ok