Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-testing > by-pkgid > 19f5537ccbd2ad2ad8074b966cacb8c7 > scriptlet

kernel-tmb-desktop-2.6.34.5-1mdv-1-1mdv2010.1.x86_64.rpm

PREUN

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

POSTIN

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

POSTUN

/bin/sh
/sbin/kernel_remove_initrd 2.6.34.5-tmb-desktop-1mdv