From d65ed0d7a281a764a823e1ee2a972f563fceaa77 Mon Sep 17 00:00:00 2001 From: adilger Date: Mon, 7 Mar 2005 22:17:51 +0000 Subject: [PATCH] Branch: b1_2 Revert the RPM requirement for /boot/System.map-%{kversion}. Not all kernels install this file. Instead, use it if it exists, but fall back to old behaviour if it doesn't (though we depmod against the right kernel at least). --- build/lustre.spec.in | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build/lustre.spec.in b/build/lustre.spec.in index b9d52ae..8534a11 100644 --- a/build/lustre.spec.in +++ b/build/lustre.spec.in @@ -23,7 +23,6 @@ servers and utilities. %package -n lustre-modules Summary: Kernel Lustre drivers for Linux %{kversion} Requires: modutils >= 2.4.10 -Requires: /boot/System.map-%{kversion} Group: Development/Kernel %description -n lustre-modules @@ -239,10 +238,18 @@ fi if [ ! -e /dev/portals ]; then mknod /dev/portals c 10 240 fi -depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0 +if [ -f /boot/System.map-%{kversion} ]; then + depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0 +else + depmod -ae %{kversion} || exit 0 +fi %postun -n lustre-modules -depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0 +if [ -f /boot/System.map-%{kversion} ]; then + depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0 +else + depmod -ae %{kversion} || exit 0 +fi %clean #rm -rf $RPM_BUILD_ROOT -- 1.8.3.1