kernel-source/postun.sh
OBS User autobuild 303133bcff Accepting request 18912 from Kernel:HEAD
Copy from Kernel:HEAD/kernel-source based on submit request 18912 from user jeff_mahoney

OBS-URL: https://build.opensuse.org/request/show/18912
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kernel-source?expand=0&rev=68
2009-08-26 20:31:04 +00:00

33 lines
876 B
Bash

wm2=/usr/lib/module-init-tools/weak-modules2
if [ @BASE_PACKAGE@ = 0 ]; then
if [ -x $wm2 ]; then
nvr=@SUBPACKAGE@-@RPM_VERSION_RELEASE@
/bin/bash -${-/e/} $wm2 --remove-kernel-modules @KERNELRELEASE@-@FLAVOR@ < /var/run/rpm-$nvr-modules
fi
rm -f /var/run/rpm-$nvr-modules
exit 0
fi
# Remove symlinks from /lib/modules/$krel/weak-updates/.
if [ -x $wm2 ]; then
/bin/bash -${-/e/} $wm2 --remove-kernel @KERNELRELEASE@-@FLAVOR@
fi
suffix=
case @FLAVOR@ in
kdump|ps3|xen*|vanilla)
suffix=-@FLAVOR@
;;
esac
# remove fstab check once perl-Bootloader can cope with it
if [ -f /etc/fstab ]; then
if [ -x /usr/lib/bootloader/bootloader_entry ]; then
/usr/lib/bootloader/bootloader_entry \
remove \
@FLAVOR@ \
@KERNELRELEASE@-@FLAVOR@ \
@IMAGE@-@KERNELRELEASE@-@FLAVOR@ \
initrd-@KERNELRELEASE@-@FLAVOR@
fi
fi