Sophie

Sophie

distrib > Mageia > 4 > x86_64 > media > core-updates > by-pkgid > a4776dd364cb3fb14e26906d1622d3ab > scriptlet

kernel-tmb-desktop-3.14.23-1.mga4-1-1.mga4.x86_64.rpm

PREUN

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

POSTIN

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

POSTUN

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

POSTTRANS

/bin/sh
if [ -x /usr/sbin/dkms_autoinstaller -a -d /usr/src/3.14.23-tmb-desktop-1.mga4 ]; then
    /usr/sbin/dkms_autoinstaller start 3.14.23-tmb-desktop-1.mga4
fi