Readd zpool_clear_label() from OpenSolaris
[zfs.git] / rpm / generic / zfs.spec.in
index ddbee84..c832404 100644 (file)
@@ -29,8 +29,6 @@ ExclusiveArch:  i386 i686 x86_64
 ExcludeArch:    ppc ppc64
 
 Requires:       spl = %{version}
-Requires:       zfs-dracut = %{version}
-Requires:       zfs-test = %{version}
 Requires:       %{name}-kmod >= %{version}
 Provides:       %{name}-kmod-common = %{version}
 
@@ -115,7 +113,16 @@ make %{?_smp_mflags}
 make install DESTDIR=%{?buildroot}
 find %{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \;
 
-%post -p /sbin/ldconfig
+%post
+/sbin/ldconfig
+[ -x /sbin/chkconfig ] && /sbin/chkconfig --add zfs
+exit 0
+
+%preun
+if [ $1 -eq 0 ] ; then
+    [ -x /sbin/chkconfig ] && /sbin/chkconfig --del zfs
+fi
+exit 0
 
 %postun -p /sbin/ldconfig