]> git.pld-linux.org Git - packages/EMCpower.git/commitdiff
- chkconfig PowerPath for now
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 29 May 2007 14:08:30 +0000 (14:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- drop unused pre scriptlet

Changed files:
    EMCpower.spec -> 1.22

EMCpower.spec

index f4a3f241d5d11b2f5adfef8863dfce59f2540638..f577f459e59a18260253dc11d29c8b381bba4a97 100644 (file)
@@ -36,6 +36,7 @@ Source1:      %{name}.LINUX-%{version}-157.sles10.x86_64.rpm
 NoSource:      0
 NoSource:      1
 Patch0:                %{name}-init.patch
+Requires(post,preun):  /sbin/chkconfig
 Obsoletes:     EMCpower.LINUX
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -165,36 +166,13 @@ done
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if 0
-%verifyscript
-echo "These PowerPath modules are installed"
-/sbin/lsmod | head -n 1
-/sbin/lsmod | grep emc
-echo "DONE"
-
-%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
+%post
+/sbin/chkconfig --add PowerPath
 
-# 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
+%preun
+if [ "$1" = "0" ]; then
+       /sbin/chkconfig --del PowerPath
 fi
-%endif
 
 %post  -n kernel-block-emc
 %depmod %{_kernel_ver}
This page took 0.078016 seconds and 4 git commands to generate.