-for ext in .local "" ; do
- f=/etc/modprobe.conf$ext
- if [ -f $f ] && ! grep llite $f >/dev/null 2>/dev/null ; then
- cat >> $f <<EOF
-alias lustre llite
-EOF
- break
+
+# 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