I've updated the patch for 0.7.9-3 thought there where no changes that
prevented the last patch from working.

Please commit the patch to enable sysvinit for ZFS.
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-28 04:22:02.000000000 -0600
+++ zfs-linux-0.7.9/debian/changelog	2018-06-03 07:12:43.000000000 -0600
@@ -1,3 +1,10 @@
+zfs-linux (0.7.9-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add sysvinit scripts. 
+
+ -- Chris Dos <ch...@chrisdos.com>  Sun, 03 Jun 2018 07:12:43 -0600
+
 zfs-linux (0.7.9-3) unstable; urgency=medium
 
   [ Antonio Russo ]
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-06-03 07:08:42.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 10:11:36.000000000 -0600
+++ zfs-linux-0.7.9/debian/rules	2018-06-03 07:10:41.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-28 04:07:08.000000000 -0600
+++ zfs-linux-0.7.9/debian/zfsutils-linux.install	2018-06-03 07:10:41.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-06-03 07:10:41.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