-
-%post modules
-if [ -f /boot/System.map-%{kversion} ]; then
- depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
-else
- depmod -ae %{kversion} || exit 0
-fi
-
-MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
-# "weak modules" support
-# Suse
-if [ -x /usr/lib/module-init-tools/weak-modules ]; then
- rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
- /usr/lib/module-init-tools/weak-modules --add-modules
-fi
-# RedHat
-if [ -x /sbin/weak-modules ]; then
- rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
- /sbin/weak-modules --add-modules
-fi
-
-# If the kernel was built to reject unsupported modules (e.g. not a Lustre
-# kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
-# print a warning so that users are aware of this issue.
-if sysctl kernel.unsupported >/dev/null 2>&1 &&
- [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
- ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
- echo "
- warning: the Lustre modules are not supported by Novell. To use Lustre
- on this system, you should put
-
- allow_unsupported_modules 1
-
- into /etc/modprobe.d/unsupported_modules"
-fi
-
-%if %{build_lustre_osd_ldiskfs}
-%post osd-ldiskfs
-if [ -f /boot/System.map-%{kversion} ]; then
- depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
-else
- depmod -ae %{kversion} || exit 0
-fi
-
-OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
-# "weak modules" support
-# Suse
-if [ -x /usr/lib/module-init-tools/weak-modules ]; then
- rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
- /usr/lib/module-init-tools/weak-modules --add-modules
-fi
-# RedHat
-if [ -x /sbin/weak-modules ]; then
- rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
- /sbin/weak-modules --add-modules
-fi
-
-# If the kernel was built to reject unsupported modules (e.g. not a Lustre
-# kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
-# print a warning so that users are aware of this issue.
-if sysctl kernel.unsupported >/dev/null 2>&1 &&
- [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
- ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
- echo "
- warning: the Lustre modules are not supported by Novell. To use Lustre
- on this system, you should put
-
- allow_unsupported_modules 1
-
- into /etc/modprobe.d/unsupported_modules"
-fi
+%if %{with manpages}
+%{_mandir}/man?/*
+%endif
+%{_datadir}/lustre
+%{_includedir}/lustre
+%{_includedir}/linux/lnet
+%{_includedir}/linux/lustre
+%endif
+%{_sysconfdir}/udev/rules.d/99-lustre.rules
+%if %{with servers}
+%{_sysconfdir}/udev/rules.d/99-lustre-server.rules
+%endif
+%if %{with zfs}
+%config(noreplace) %{_sysconfdir}/ldev.conf
+%endif
+%config(noreplace) %{_sysconfdir}/lnet.conf
+%config(noreplace) %{_sysconfdir}/modprobe.d/ko2iblnd.conf
+%if %{with lustre_utils}
+%config(noreplace) %{_sysconfdir}/lnet_routes.conf
+%endif
+%if %{with lustre_modules}
+
+%if %{with shared}
+%if %{with ldiskfs}
+%if %{with lustre_utils}
+%files osd-ldiskfs-mount
+%defattr(-,root,root)
+%{_libdir}/@PACKAGE@/mount_osd_ldiskfs.so