[Pkg-zfsonlinux-devel] [PATCH 2/4] Add LSB headers for iSCSI in /etc/init.d/zfs-share

Richard Laager rlaager at wiktel.com
Sun Sep 15 07:19:52 UTC 2013


From: Darik Horn <dajhorn at vanadac.com>

Add iscsitarget and istgt to the `Provides`, `Should-Start`,
and `Should-Stop` meta fields in the zfs-share init script.

Also widen the sysv sequence numbers for zfs-share to 25 15 on Ubuntu
to better accomodate any local init scripts that might be installed
near the iSCSI services.
---
 debian/rules                   |    2 +-
 debian/zfsutils.zfs-share.init |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/debian/rules b/debian/rules
index a38a880..247d4c4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -119,7 +119,7 @@ else ifeq ($(LSB_DISTRIBUTOR),Ubuntu)
 	@# Ubuntu runs nfs-kernel-server at sysv sequence 20 80,
 	@# iscsitarget at 20 20, and samba through upstart.
 	dh_installinit --name=zfs-share \
-	  --no-restart-on-upgrade --no-start -- defaults 21 19
+	  --no-restart-on-upgrade --no-start -- defaults 25 15
 else
 	dh_installinit --name=zfs-share \
 	  --no-restart-on-upgrade --no-start
diff --git a/debian/zfsutils.zfs-share.init b/debian/zfsutils.zfs-share.init
index d661d3f..a9cc899 100644
--- a/debian/zfsutils.zfs-share.init
+++ b/debian/zfsutils.zfs-share.init
@@ -1,16 +1,16 @@
 #!/bin/sh
-#
+
 ### BEGIN INIT INFO
-# Provides: sharenfs sharesmb zfs-share
+# Provides: shareiscsi sharenfs sharesmb zfs-share
 # Required-Start: $local_fs $network $remote_fs
 # Required-Stop: $local_fs $network $remote_fs
 # Default-Start: 2 3 4 5
 # Default-Stop: 0 1 6
-# Should-Start: nfs-kernel-server samba
-# Should-Stop: nfs-kernel-server samba
-# Short-Description: Network share ZFS filesystems.
+# Should-Start: iscsi iscsitarget istgt nfs-kernel-server samba
+# Should-Stop: iscsi iscsitarget istgt nfs-kernel-server samba
+# Short-Description: Network share ZFS datasets.
 # Description: Run the `zfs share -a` or `zfs unmount -a` commands
-#              for controlling NFS or CIFS network shares.
+#	for controlling iSCSI, NFS, or CIFS network shares.
 ### END INIT INFO
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
-- 
1.7.9.5




More information about the Pkg-zfsonlinux-devel mailing list