Sophie

Sophie

distrib > Mandriva > current > x86_64 > media > contrib-testing > by-pkgid > 9f5c4b879e2812105da1c23c595fcb26 > scriptlet

kernel-tmb-laptop-2.6.34.1-2mdv-1-1mdv2010.1.x86_64.rpm

PREUN

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

POSTIN

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

POSTUN

/bin/sh
/sbin/kernel_remove_initrd 2.6.34.1-tmb-laptop-2mdv