Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > media > main > by-pkgid > 2d67a78cde7e45f87c97ac181dc012c0 > scriptlet

module-init-tools-3.2-0.pre8.2mdk.x86_64.rpm

POSTIN

/bin/sh
for i in insmod lsmod modprobe rmmod depmod modinfo;do
	update-alternatives --install /sbin/$i $i /sbin/$i-25 20
	update-alternatives --install \
	/usr/share/man/man8/$i.8.bz2 man-$i /usr/share/man/man8/$i-25.8.bz2 20
	[ -e /sbin/$i ] || update-alternatives --auto $i
	[ -e /usr/share/man/$i.8.bz2 ] || update-alternatives --auto man-$i
done

if [ ! -s /etc/modprobe.conf ]; then
	MODPROBE_CONF=/etc/modprobe.conf
elif [ -e /etc/modprobe.conf.rpmnew ]; then
	MODPROBE_CONF=/etc/modprobe.conf.rpmnew
fi

if [ -s /etc/modules.conf -a -n "$MODPROBE_CONF" ]; then
	echo '# This file is autogenerated from /etc/modules.conf using generate-modprobe.conf command' >> $MODPROBE_CONF
	echo >> $MODPROBE_CONF
	/sbin/generate-modprobe.conf >> $MODPROBE_CONF 2> /dev/null
fi

if [ -s /etc/modprobe.conf ]; then
	perl -pi -e 's/(^\s*include\s.*modprobe\.(default|compat).*)/# This file is now included automatically by modprobe\n# $1/' /etc/modprobe.conf
fi

POSTUN

/bin/sh
for i in insmod lsmod modprobe rmmod depmod modinfo;do
	if [ ! -f /sbin/$i-25 ]; then
	  update-alternatives --remove $i /sbin/$i
	fi
	[ -e /sbin/$i ] || update-alternatives --auto $i

	if [ ! -f /usr/share/man/man8/$i-25.8.bz2 ]; then
	  update-alternatives --remove man-$i /usr/share/man/man8/$i.8.bz2
	fi
	[ -e /usr/share/man/man8/$i.8.bz2 ] || update-alternatives --auto man-$i
done