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