Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > fe53dc62076f05b5b324de557b2eb38b > scriptlet

kernel-tmb-desktop-4.14.18-1.mga6-1-1.mga6.x86_64.rpm

PREUN

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

POSTIN

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

POSTUN

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

POSTTRANS

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