-%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
-
-# "weak modules" support
-# Suse
-if [ -x /usr/lib/module-init-tools/weak-modules ]; then
- rpm -ql %{name}-modules-%{version}-%{release} | grep '\.ko$' |
- /usr/lib/module-init-tools/weak-modules --add-modules
-fi
-# RedHat
-if [ -x /sbin/weak-modules ]; then
- rpm -ql %{name}-modules-%{version}-%{release} | grep '\.ko$' |
- /sbin/weak-modules --add-modules
-fi
-
-cat <<EOF
-Congratulations on finishing your Lustre installation! To register
-your copy of Lustre and find out more about Lustre Support, Service,
-and Training offerings please visit
-
-http://www.sun.com/software/products/lustre/lustre_reg.jsp
-EOF
-
-# for update from < v1.4.6
-
-for f in /etc/modules.conf /etc/modprobe.conf /etc/modprobe.conf.local ;
-do
- if [ -f $f ]; then
- if grep 'lustre llite' $f >/dev/null 2>/dev/null ; then
- [ ! -f $f.rpmsave ] && cp $f $f.rpmsave
- TMPFILE=`mktemp $f.XXXXXX` && \
- rm -f $TMPFILE && touch $TMPFILE && \
- grep -v 'lustre llite' $f >> $TMPFILE && \
- mv $TMPFILE $f
- fi
- if egrep "^[^#]*(add below|install) ptlrpc" $f ; then
- [ ! -f $f.rpmsave ] && cp $f $f.rpmsave
- TMPFILE=`mktemp $f.XXXXXX` && \
- rm -f $TMPFILE && touch $TMPFILE && \
- sed -e "s/^[^#]*\(add below\|install\) ptlrpc.*/#&/" $f >> $TMPFILE && \
- mv $TMPFILE $f
- fi
- fi
-done
-
-# 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
-
-%preun modules
-rpm -ql %{name}-modules-%{version}-%{release} | grep '\.ko$' > /var/run/%{name}-modules
-
-%postun 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
-
-# "weak modules" support
-# Suse
-if [ -x /usr/lib/module-init-tools/weak-modules ]; then
- cat /var/run/%{name}-modules | grep '\.ko$' |
- /usr/lib/module-init-tools/weak-modules --remove-modules
-fi
-# RedHat
-if [ -x /sbin/weak-modules ]; then
- cat /var/run/%{name}-modules | grep '\.ko$' |
- /sbin/weak-modules --remove-modules
-fi
-rm /var/run/%{name}-modules
-
-%if %{build_lustre_tests}
-%post tests
-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 tests
-if [ -f /boot/System.map-%{kversion} ]; then
- depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
-else
- depmod -ae %{kversion} || exit 0
-fi
+%if %{with lustre_iokit}
+%files -n lustre-iokit
+%defattr(-, root, root)
+%{_bindir}/iokit-config
+%{_bindir}/iokit-gather-stats
+%{_bindir}/iokit-libecho
+%{_bindir}/iokit-lstats
+%{_bindir}/iokit-parse-ior
+%{_bindir}/iokit-plot-obdfilter
+%{_bindir}/iokit-plot-ost
+%{_bindir}/iokit-plot-sgpdd
+%{_bindir}/ior-survey
+%{_bindir}/mds-survey
+%{_bindir}/obdfilter-survey
+%{_bindir}/ost-survey
+%{_bindir}/sgpdd-survey
+%doc lustre-iokit/ior-survey/README.ior-survey
+%doc lustre-iokit/mds-survey/README.mds-survey
+%doc lustre-iokit/obdfilter-survey/README.obdfilter-survey
+%doc lustre-iokit/ost-survey/README.ost-survey
+%doc lustre-iokit/sgpdd-survey/README.sgpdd-survey
+%doc lustre-iokit/stats-collect/README.iokit-lstats