]> git.proxmox.com Git - mirror_zfs-debian.git/blob - debian/patches/init-debian-openrc-workaround.patch
Patch upstream init scripts to make them work for Debian+OpenRC setup.
[mirror_zfs-debian.git] / debian / patches / init-debian-openrc-workaround.patch
1 Description: Make these scripts work for Debian+OpenRC setup.
2 Author: Mo Zhou <lumin@debian.org>
3 Last-update: 20181026
4
5 diff --git a/etc/init.d/zfs-import.in b/etc/init.d/zfs-import.in
6 index fea661bb..404af82d 100644
7 --- a/etc/init.d/zfs-import.in
8 +++ b/etc/init.d/zfs-import.in
9 @@ -1,4 +1,4 @@
10 -#!@SHELL@
11 +#!/bin/sh
12 #
13 # zfs-import This script will import ZFS pools
14 #
15 @@ -308,8 +308,6 @@ do_start()
16
17 # ----------------------------------------------------
18
19 -if [ ! -e /sbin/openrc-run ]
20 -then
21 case "$1" in
22 start)
23 do_start
24 @@ -331,9 +329,3 @@ then
25 esac
26
27 exit $?
28 -else
29 - # Create wrapper functions since Gentoo don't use the case part.
30 - depend() { do_depend; }
31 - start() { do_start; }
32 - status() { do_status; }
33 -fi
34 diff --git a/etc/init.d/zfs-mount.in b/etc/init.d/zfs-mount.in
35 index fa954e09..b6a3de9b 100644
36 --- a/etc/init.d/zfs-mount.in
37 +++ b/etc/init.d/zfs-mount.in
38 @@ -1,4 +1,4 @@
39 -#!@SHELL@
40 +#!/bin/sh
41 #
42 # zfs-mount This script will mount/umount the zfs filesystems.
43 #
44 @@ -199,8 +199,6 @@ do_stop()
45
46 # ----------------------------------------------------
47
48 -if [ ! -e /sbin/openrc-run ]
49 -then
50 case "$1" in
51 start)
52 do_start
53 @@ -219,9 +217,3 @@ then
54 esac
55
56 exit $?
57 -else
58 - # Create wrapper functions since Gentoo don't use the case part.
59 - depend() { do_depend; }
60 - start() { do_start; }
61 - stop() { do_stop; }
62 -fi
63 diff --git a/etc/init.d/zfs-share.in b/etc/init.d/zfs-share.in
64 index ce3cc1cc..0b14f481 100644
65 --- a/etc/init.d/zfs-share.in
66 +++ b/etc/init.d/zfs-share.in
67 @@ -1,4 +1,4 @@
68 -#!@SHELL@
69 +#!/bin/sh
70 #
71 # zfs-share This script will network share zfs filesystems and volumes.
72 #
73 @@ -58,7 +58,6 @@ do_stop()
74
75 # ----------------------------------------------------
76
77 -if [ ! -e /sbin/openrc-run ]; then
78 case "$1" in
79 start)
80 do_start
81 @@ -77,9 +76,3 @@ if [ ! -e /sbin/openrc-run ]; then
82 esac
83
84 exit $?
85 -else
86 - # Create wrapper functions since Gentoo don't use the case part.
87 - depend() { do_depend; }
88 - start() { do_start; }
89 - stop() { do_stop; }
90 -fi
91 diff --git a/etc/init.d/zfs-zed.in b/etc/init.d/zfs-zed.in
92 index d0086eef..4798105d 100644
93 --- a/etc/init.d/zfs-zed.in
94 +++ b/etc/init.d/zfs-zed.in
95 @@ -1,4 +1,4 @@
96 -#!@SHELL@
97 +#!/bin/sh
98 #
99 # zfs-zed
100 #
101 @@ -98,7 +98,6 @@ do_reload()
102
103 # ----------------------------------------------------
104
105 -if [ ! -e /sbin/openrc-run ]; then
106 case "$1" in
107 start)
108 do_start
109 @@ -124,11 +123,3 @@ if [ ! -e /sbin/openrc-run ]; then
110 esac
111
112 exit $?
113 -else
114 - # Create wrapper functions since Gentoo don't use the case part.
115 - depend() { do_depend; }
116 - start() { do_start; }
117 - stop() { do_stop; }
118 - status() { do_status; }
119 - reload() { do_reload; }
120 -fi