SPECS: unh_iscsi.spec - use %service, add chkconfig deps

glen glen at pld-linux.org
Thu Apr 20 19:54:35 CEST 2006


Author: glen                         Date: Thu Apr 20 17:54:35 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service, add chkconfig deps

---- Files affected:
SPECS:
   unh_iscsi.spec (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SPECS/unh_iscsi.spec
diff -u SPECS/unh_iscsi.spec:1.6 SPECS/unh_iscsi.spec:1.7
--- SPECS/unh_iscsi.spec:1.6	Tue Dec 13 16:35:56 2005
+++ SPECS/unh_iscsi.spec	Thu Apr 20 19:54:30 2006
@@ -9,11 +9,11 @@
 %bcond_without	userspace	# don't build userspace module
 %bcond_with	verbose		# verbose build (V=1)
 #
+%define		_rel 1
 Summary:	UNH iSCSI Initiator/Target for Linux
 Summary(pl):	Sterowniki UNH iSCSI Initiator/Target dla Linuksa
 Name:		unh_iscsi
 Version:	1.6.00
-%define		_rel 1
 Release:	%{_rel}
 License:	GPL
 Group:		Base/Kernel
@@ -24,7 +24,10 @@
 Patch0:		%{name}-headers.patch
 URL:		http://unh-iscsi.sourceforge.net/
 %{?with_dist_kernel:BuildRequires:	kernel-headers >= 2.6.0}
+BuildRequires:	rpmbuild(macros) >= 1.268
 BuildRequires:	sysfsutils-static
+Requires(post,preun):	/sbin/chkconfig
+Requires:	rc-scripts
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_sbindir	/sbin
@@ -147,17 +150,11 @@
 
 %post
 /sbin/chkconfig --add %{name}
-#if [ -f /var/lock/subsys/%{name} ]; then
-#	/etc/rc.d/init.d/%{name} restart 1>&2
-#else
-#	echo "Type \"/etc/rc.d/init.d/%{name} start\" to start %{name}" 1>&2
-#fi
+#%%service %{name} start
 
 %preun
 if [ "$1" = "0" ]; then
-#	if [ -f /var/lock/subsys/%{name} ]; then
-#		/etc/rc.d/init.d/%{name} stop >&2
-#	fi
+	%service %{name} stop
 	/sbin/chkconfig --del %{name}
 fi
 
@@ -188,6 +185,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.7  2006/04/20 17:54:30  glen
+- use %service, add chkconfig deps
+
 Revision 1.6  2005/12/13 15:35:56  glen
 - adapterized (sorted %verify attrs)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/unh_iscsi.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list