Sophie

Sophie

distrib > Mandriva > 7.1 > i586 > media > main > by-pkgid > 5043f959a6b032536d5ca860a44e99db > scriptlet

Device3Dfx-2.3.4-5mdk.i586.rpm

PREIN

/bin/sh
groupadd tdfx >& /dev/null

POSTIN

/bin/sh
if [ "$1" = 1 ]; then
	if [ ! -c /dev/3dfx ]; then
	    mknod /dev/3dfx c 107 0
	    chown root.tdfx /dev/3dfx
	    chmod 660 /dev/3dfx
	fi

	if [[ -f /etc/conf.modules ]]; then
	    if ! grep -q 3dfx /etc/conf.modules; then 
		echo alias char-major-107 3dfx >> /etc/conf.modules
	    fi
	fi

	if [[ -f /etc/modules.conf ]]; then
	     if ! grep -q 3dfx /etc/modules.conf; then
		echo alias char-major-107 3dfx >> /etc/modules.conf
	     fi
	fi
fi
if [ "$DURING_INSTALL" = "" ]; then
    /sbin/depmod -a > /dev/null
fi

POSTUN

/bin/sh
if [ "$1" = 0 ]; then
	if [[ -f /etc/conf.modules ]]; then
	    grep -v 3dfx /etc/conf.modules > /etc/conf.modules.tmp
	    mv /etc/conf.modules.tmp /etc/conf.modules
	fi

	if [[ -f /etc/modules.conf ]]; then
	    grep -v 3dfx /etc/modules.conf > /etc/modules.conf.tmp
	    mv /etc/modules.conf.tmp /etc/modules.conf
	fi

	if [ -c /dev/3dfx ]; then
	    rm -f /dev/3dfx
	fi

	# Delete the 3dfx group.
	groupdel tdfx >& /dev/null
fi

/sbin/depmod -a > /dev/null