Author: glen                         Date: Mon Sep  4 08:41:42 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- %pre striptlet copied from original RPM

---- Files affected:
SPECS:
   EMCpower.spec (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: SPECS/EMCpower.spec
diff -u SPECS/EMCpower.spec:1.8 SPECS/EMCpower.spec:1.9
--- SPECS/EMCpower.spec:1.8     Mon Sep  4 10:32:45 2006
+++ SPECS/EMCpower.spec Mon Sep  4 10:41:37 2006
@@ -210,6 +210,29 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+# Check - Only install on a 2.6 kernel
+expr `uname -r` : '2\.6' > /dev/null
+if [ $? -ne 0 ]; then
+       echo "This PowerPath package does not support this kernel."
+       exit 1
+fi
+
+# Check - Make sure no devices are in use.
+if [ "`/sbin/lsmod | grep -w emcp`" != "" ]; then
+       /sbin/powermt save > /dev/null 2>&1
+       /sbin/powermt remove dev=all > /dev/null 2>&1
+       if [ "`powermt display dev=all 2>&1 | grep "not found"`" = "" ]; then
+               echo "Unable to remove devices from the PowerPath 
configuration."
+               echo "Please make sure no PowerPath devices are in use and 
retry."
+               /sbin/powermt config > /dev/null 2>&1
+               /sbin/powermt load > /dev/null 2>&1
+               exit 1
+       fi
+       /sbin/powermt config > /dev/null 2>&1
+       /sbin/powermt load > /dev/null 2>&1
+fi
+
 %post  -n kernel-block-emc
 %depmod %{_kernel_ver}
 
@@ -276,6 +299,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.9  2006/09/04 08:41:37  glen
+- %pre striptlet copied from original RPM
+
 Revision 1.8  2006/09/04 08:32:45  glen
 - few compat symlinks
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/EMCpower.spec?r1=1.8&r2=1.9&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to