Sophie

Sophie

distrib > Scientific%20Linux > 5x > i386 > by-pkgid > 056dbb2ee3a2924fad971937909015e9 > scriptlet

pam-0.99.6.2-14.el5_11.i386.rpm

PREIN

/bin/sh
# Figure whether or not we're using shadow/md5 passwords if we're upgrading.
if [ -f /etc/pam.d/other ] ; then
	USEMD5=
	if [ -f /etc/sysconfig/authconfig ] ; then
		. /etc/sysconfig/authconfig
	fi
	if [ -z "$USEMD5" ] ; then
		if [ -f /etc/shadow ] ; then
			passwdfiles="/etc/passwd /etc/shadow"
		else
			passwdfiles="/etc/passwd"
		fi
		if cut -f2 -d: $passwdfiles | grep -q '^\$1\$' ; then
			echo USEMD5=yes >> /etc/sysconfig/authconfig
			USEMD5=yes
		else
			echo USEMD5=no  >> /etc/sysconfig/authconfig
			USEMD5=no
		fi
	fi
fi
exit 0

POSTIN

/bin/sh
/sbin/ldconfig

getent group audio >/dev/null || \
    /usr/sbin/groupadd -g 63 audio 2>/dev/null || :

if [ ! -f /etc/shadow ] ; then
	tmp=`mktemp /etc/pam.d/pam-post.XXXXXX`
	if [ -n "$tmp" ] ; then
		sed 's| shadow||g' /etc/pam.d/system-auth > $tmp && \
		cat $tmp > /etc/pam.d/system-auth
		rm -f $tmp
	fi
fi
if [ -f /etc/sysconfig/authconfig ] ; then
	. /etc/sysconfig/authconfig
fi
if [ "$USEMD5" = "no" ] ; then
	tmp=`mktemp /etc/pam.d/pam-post.XXXXXX`
	if [ -n "$tmp" ] ; then
		sed 's| md5||g' /etc/pam.d/system-auth > $tmp && \
		cat $tmp > /etc/pam.d/system-auth
		rm -f $tmp
	fi
fi
if [ ! -e /var/log/faillog ] ; then
	install -m 600 /dev/null /var/log/faillog
fi
if [ ! -e /var/log/tallylog ] ; then
	install -m 600 /dev/null /var/log/tallylog
fi