Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates > by-pkgid > 365dae93383afb228f4cd8358b199699 > scriptlet

kernel-tmb-desktop-4.4.13-1.mga5-1-1.mga5.i586.rpm

PREUN

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

POSTIN

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

POSTUN

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

POSTTRANS

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