Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-updates > by-pkgid > c098bcfd025f59585ff86ffc20b952af > scriptlet

kernel-tmb-desktop586-3.10.40-1.mga3-1-1.mga3.i586.rpm

PREUN

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

POSTIN

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

POSTUN

/bin/sh
/sbin/kernel_remove_initrd 3.10.40-tmb-desktop586-1.mga3
rm -rf /lib/modules/3.10.40-tmb-desktop586-1.mga3 > /dev/null

POSTTRANS

/bin/sh
if [ -x /usr/sbin/dkms_autoinstaller -a -d /usr/src/3.10.40-tmb-desktop586-1.mga3 ]; then
    /usr/sbin/dkms_autoinstaller start 3.10.40-tmb-desktop586-1.mga3
fi