Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > cbe973039065b6cde162f95ea0e5f160 > scriptlet

kernel-tmb-desktop-2.6.38.7-1.mga-1-1.mga1.i586.rpm

PREUN

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

POSTIN

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

POSTUN

/bin/sh
/sbin/kernel_remove_initrd 2.6.38.7-tmb-desktop-1.mga
rm -rf /lib/modules/2.6.38.7-tmb-desktop-1.mga > /dev/null