Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-testing > by-pkgid > 7512c9677cf58ba514e83ec6f070190f > scriptlet

kernel-tmb-laptop-2.6.34.6-1mdv-1-1mdv2010.1.i586.rpm

PREUN

/bin/sh
/sbin/installkernel -R 2.6.34.6-tmb-laptop-1mdv
pushd /boot > /dev/null
if [ -L vmlinuz-tmb-laptop ]; then
	if [ "" = "vmlinuz-2.6.34.6-tmb-laptop-1mdv" ]; then
		rm -f vmlinuz-tmb-laptop
	fi
fi
if [ -L initrd-tmb-laptop.img ]; then
	if [ "" = "initrd-2.6.34.6-tmb-laptop-1mdv.img" ]; then
		rm -f initrd-tmb-laptop.img
	fi
fi
popd > /dev/null
if [ -L /lib/modules/2.6.34.6-tmb-laptop-1mdv/build ]; then
	rm -f /lib/modules/2.6.34.6-tmb-laptop-1mdv/build
fi
if [ -L /lib/modules/2.6.34.6-tmb-laptop-1mdv/source ]; then
	rm -f /lib/modules/2.6.34.6-tmb-laptop-1mdv/source
fi
exit 0

POSTIN

/bin/sh
/sbin/installkernel -L 2.6.34.6-tmb-laptop-1mdv
pushd /boot > /dev/null
if [ -L vmlinuz-tmb-laptop ]; then
	rm -f vmlinuz-tmb-laptop
fi
ln -sf vmlinuz-2.6.34.6-tmb-laptop-1mdv vmlinuz-tmb-laptop
if [ -L initrd-tmb-laptop.img ]; then
	rm -f initrd-tmb-laptop.img
fi
ln -sf initrd-2.6.34.6-tmb-laptop-1mdv.img initrd-tmb-laptop.img
popd > /dev/null
# create kernel-devel symlinks if matching -devel- rpm is installed
if [ -d /usr/src/2.6.34.6-tmb-laptop-1mdv ]; then
	rm -f /lib/modules/2.6.34.6-tmb-laptop-1mdv/{build,source}
	ln -sf /usr/src/2.6.34.6-tmb-laptop-1mdv /lib/modules/2.6.34.6-tmb-laptop-1mdv/build
	ln -sf /usr/src/2.6.34.6-tmb-laptop-1mdv /lib/modules/2.6.34.6-tmb-laptop-1mdv/source
fi
# create kernel-source symlinks only if matching -devel- rpm is not installed
if [ -d /usr/src/2.6.34.6-tmb-1mdv -a ! -d /usr/src/2.6.34.6-tmb-laptop-1mdv ]; then
	rm -f /lib/modules/2.6.34.6-tmb-laptop-1mdv/{build,source}
	ln -sf /usr/src/2.6.34.6-tmb-1mdv /lib/modules/2.6.34.6-tmb-laptop-1mdv/build
	ln -sf /usr/src/2.6.34.6-tmb-1mdv /lib/modules/2.6.34.6-tmb-laptop-1mdv/source
fi

POSTUN

/bin/sh
/sbin/kernel_remove_initrd 2.6.34.6-tmb-laptop-1mdv