]> git.proxmox.com Git - mirror_zfs-debian.git/commitdiff
Patch upstream init scripts to make them work for Debian+OpenRC setup.
authorMo Zhou <cdluminate@gmail.com>
Fri, 26 Oct 2018 08:18:16 +0000 (08:18 +0000)
committerMo Zhou <cdluminate@gmail.com>
Fri, 26 Oct 2018 08:18:16 +0000 (08:18 +0000)
debian/patches/init-debian-openrc-workaround.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/init-debian-openrc-workaround.patch b/debian/patches/init-debian-openrc-workaround.patch
new file mode 100644 (file)
index 0000000..7e769a5
--- /dev/null
@@ -0,0 +1,120 @@
+Description: Make these scripts work for Debian+OpenRC setup.
+Author: Mo Zhou <lumin@debian.org>
+Last-update: 20181026
+
+diff --git a/etc/init.d/zfs-import.in b/etc/init.d/zfs-import.in
+index fea661bb..404af82d 100644
+--- a/etc/init.d/zfs-import.in
++++ b/etc/init.d/zfs-import.in
+@@ -1,4 +1,4 @@
+-#!@SHELL@
++#!/bin/sh
+ #
+ # zfs-import    This script will import ZFS pools
+ #
+@@ -308,8 +308,6 @@ do_start()
+ # ----------------------------------------------------
+-if [ ! -e /sbin/openrc-run ]
+-then
+       case "$1" in
+               start)
+                       do_start
+@@ -331,9 +329,3 @@ then
+       esac
+       exit $?
+-else
+-      # Create wrapper functions since Gentoo don't use the case part.
+-      depend() { do_depend; }
+-      start() { do_start; }
+-      status() { do_status; }
+-fi
+diff --git a/etc/init.d/zfs-mount.in b/etc/init.d/zfs-mount.in
+index fa954e09..b6a3de9b 100644
+--- a/etc/init.d/zfs-mount.in
++++ b/etc/init.d/zfs-mount.in
+@@ -1,4 +1,4 @@
+-#!@SHELL@
++#!/bin/sh
+ #
+ # zfs-mount     This script will mount/umount the zfs filesystems.
+ #
+@@ -199,8 +199,6 @@ do_stop()
+ # ----------------------------------------------------
+-if [ ! -e /sbin/openrc-run ]
+-then
+       case "$1" in
+               start)
+                       do_start
+@@ -219,9 +217,3 @@ then
+       esac
+       exit $?
+-else
+-      # Create wrapper functions since Gentoo don't use the case part.
+-      depend() { do_depend; }
+-      start() { do_start; }
+-      stop() { do_stop; }
+-fi
+diff --git a/etc/init.d/zfs-share.in b/etc/init.d/zfs-share.in
+index ce3cc1cc..0b14f481 100644
+--- a/etc/init.d/zfs-share.in
++++ b/etc/init.d/zfs-share.in
+@@ -1,4 +1,4 @@
+-#!@SHELL@
++#!/bin/sh
+ #
+ # zfs-share     This script will network share zfs filesystems and volumes.
+ #
+@@ -58,7 +58,6 @@ do_stop()
+ # ----------------------------------------------------
+-if [ ! -e /sbin/openrc-run ]; then
+       case "$1" in
+               start)
+                       do_start
+@@ -77,9 +76,3 @@ if [ ! -e /sbin/openrc-run ]; then
+       esac
+       exit $?
+-else
+-      # Create wrapper functions since Gentoo don't use the case part.
+-      depend() { do_depend; }
+-      start() { do_start; }
+-      stop() { do_stop; }
+-fi
+diff --git a/etc/init.d/zfs-zed.in b/etc/init.d/zfs-zed.in
+index d0086eef..4798105d 100644
+--- a/etc/init.d/zfs-zed.in
++++ b/etc/init.d/zfs-zed.in
+@@ -1,4 +1,4 @@
+-#!@SHELL@
++#!/bin/sh
+ #
+ # zfs-zed
+ #
+@@ -98,7 +98,6 @@ do_reload()
+ # ----------------------------------------------------
+-if [ ! -e /sbin/openrc-run ]; then
+       case "$1" in
+               start)
+                       do_start
+@@ -124,11 +123,3 @@ if [ ! -e /sbin/openrc-run ]; then
+       esac
+       exit $?
+-else
+-      # Create wrapper functions since Gentoo don't use the case part.
+-      depend() { do_depend; }
+-      start() { do_start; }
+-      stop() { do_stop; }
+-      status() { do_status; }
+-      reload() { do_reload; }
+-fi
index 6d5874440d037cfc3bc9e3ee4002c68ec66a7670..97c4eb617152b5190d53860eed94dd96cd7718a5 100644 (file)
@@ -8,3 +8,4 @@ enable-zed.patch
 0009-add-man-page-reference-to-systemd-units.patch
 0010-fix-install-path-of-zpool.d-scripts.patch
 2000-increase-default-zcmd-allocation-to-256K.patch
+init-debian-openrc-workaround.patch