#!/bin/sh
#
#       This script takes the necessary action to back out changes
#       made to the etc/pam.conf
#
#


PAMCONF="$PKG_INSTALL_ROOT/etc/pam.conf"
_PATCHID="$ACTIVE_PATCH"

## tools used ...

CP='/usr/bin/cp'

if [ -z "$_PATCHID" ]; then
	## something wrong here, could not identify my patch id
	: echo "WARNING: ($0) could not identify patch id"
else
	## backout changes ....
	$CP -p $PAMCONF $PAMCONF.$_PATCHID
	if [ -f $PAMCONF.pre$_PATCHID ]; then
		$CP $PAMCONF.pre$_PATCHID $PAMCONF
	fi
fi

exit 0
