I've updated the patch to work with 0.7.9-2.

I'm getting a bit frustrated about why this patch is not being committed.  I
figured you where waiting for for another release.  Well, another release has
happened and this patch was not included.  Please include this patch, and if
something is wrong with it, please let me know so we can get it sorted out and
get it committed.  It has been almost two years since this bug was opened!

        Chris
diff -Nru zfs-linux-0.7.9/debian/changelog zfs-linux-0.7.9/debian/changelog
--- zfs-linux-0.7.9/debian/changelog	2018-05-17 09:47:29.000000000 -0600
+++ zfs-linux-0.7.9/debian/changelog	2018-05-19 08:51:32.000000000 -0600
@@ -1,3 +1,10 @@
+zfs-linux (0.7.9-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add sysvinit scripts. 
+
+ -- Chris Dos <ch...@chrisdos.com>  Sat, 19 May 2018 08:51:32 -0600
+
 zfs-linux (0.7.9-2) unstable; urgency=medium
 
   [ Aron Xu ]
diff -Nru zfs-linux-0.7.9/debian/patches/1004-zed-service-bindir.patch zfs-linux-0.7.9/debian/patches/1004-zed-service-bindir.patch
--- zfs-linux-0.7.9/debian/patches/1004-zed-service-bindir.patch	2018-05-16 07:38:12.000000000 -0600
+++ zfs-linux-0.7.9/debian/patches/1004-zed-service-bindir.patch	2018-05-19 08:50:04.000000000 -0600
@@ -1,11 +1,14 @@
-Description: Fix the path to the zed binary on the systemd unit.
+Description: Fix the path to the zed binary on the systemd unit and
+ the sysvinit script.
  We install zed into /usr/sbin manually meanwhile the upstream default
  is installing it into /sbin.
  Ubuntu packages also install zed to /usr/sbin, but they ship their own
  zfs-zed unit.
 Author: Carlos Alberto Lopez <clo...@igalia.com>
 Author: Fabian Grünbichler <f.gruenbich...@proxmox.com>
+Author: Chris Dos <ch...@chrisdos.com>
 Bug-Debian: https://bugs.debian.org/849813
+Bug-Debian: https://bugs.debian.org/826994
 Forwarded: no
 --- a/etc/systemd/system/zfs-zed.service.in
 +++ b/etc/systemd/system/zfs-zed.service.in
@@ -18,3 +21,13 @@
  Restart=on-abort
  
  [Install]
+--- a/etc/init.d/zfs-functions.in
++++ b/etc/init.d/zfs-functions.in
+@@ -89,7 +89,7 @@
+
+ # Paths to what we need
+ ZFS="@sbindir@/zfs"
+-ZED="@sbindir@/zed"
++ZED="/usr/sbin/zed"
+ ZPOOL="@sbindir@/zpool"
+ ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
diff -Nru zfs-linux-0.7.9/debian/rules zfs-linux-0.7.9/debian/rules
--- zfs-linux-0.7.9/debian/rules	2018-05-17 09:47:29.000000000 -0600
+++ zfs-linux-0.7.9/debian/rules	2018-05-19 08:43:46.000000000 -0600
@@ -114,6 +114,26 @@
 	chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
 	chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs
 
+override_dh_installinit:
+	@# Install the /etc/init.d/zfs-import script.
+	dh_installinit -pzfsutils-linux --name=zfs-import \
+	--no-restart-on-upgrade --no-start
+
+	@# Install the /etc/init.d/zfs-mount script.
+	dh_installinit -pzfsutils-linux --name=zfs-mount \
+	--no-restart-on-upgrade --no-start
+
+	@# Install the /etc/init.d/zfs-share script.
+	dh_installinit -pzfsutils-linux --name=zfs-share \
+	--no-restart-on-upgrade --no-start
+
+	@# Add a dummy (link to /dev/null) for zfs-import.service
+	ln -s /dev/null $(CURDIR)/debian/zfsutils-linux/lib/systemd/system/zfs-import.service
+
+	@# Install the ZED init file.
+	dh_installinit -pzfs-zed --name=zfs-zed \
+	--no-restart-on-upgrade --no-start
+
 override_dh_dkms:
 	dh_dkms -V $(DEB_VERSION_UPSTREAM)
 
diff -Nru zfs-linux-0.7.9/debian/zfsutils-linux.install zfs-linux-0.7.9/debian/zfsutils-linux.install
--- zfs-linux-0.7.9/debian/zfsutils-linux.install	2018-05-16 07:38:12.000000000 -0600
+++ zfs-linux-0.7.9/debian/zfsutils-linux.install	2018-05-19 08:43:46.000000000 -0600
@@ -1,6 +1,8 @@
 ../tree/zfsutils-linux/* /
 etc/default/zfs
 etc/zfs/zfs-functions
+etc/init.d/zfs-import
+etc/init.d/zfs-mount
 etc/zfs/zpool.d/
 lib/systemd/system-preset/
 lib/systemd/system/zfs-import-cache.service
diff -Nru zfs-linux-0.7.9/debian/zfs-zed.install zfs-linux-0.7.9/debian/zfs-zed.install
--- zfs-linux-0.7.9/debian/zfs-zed.install	2018-05-16 07:38:12.000000000 -0600
+++ zfs-linux-0.7.9/debian/zfs-zed.install	2018-05-19 08:43:46.000000000 -0600
@@ -1,4 +1,6 @@
 etc/zfs/zed.d/*
+etc/init.d/zfs-zed
+etc/init.d/zfs-share
 lib/systemd/system/zfs-zed.service
 usr/lib/*/zfs/zed.d/*
 usr/sbin/zed

Reply via email to