]> git.proxmox.com Git - zfsonlinux.git/blob - zfs-patches/fix-dh-installinit.patch
do not install sysv init scripts
[zfsonlinux.git] / zfs-patches / fix-dh-installinit.patch
1 Do not install sysv init scripts
2
3 We use systemd on PVE, so there is no need to install old sysv init scripts.
4 Also, provided scripts are buggy, because they do not
5 include /lib/lsb/init-functions, thus do not call systemctl to start
6 services.
7
8 Adittionally, service names differ, so some services are started
9 twice (zed => zfs-zed).
10
11 Index: new/debian/rules
12 ===================================================================
13 --- new.orig/debian/rules
14 +++ new/debian/rules
15 @@ -113,7 +113,7 @@ override_dh_installinit:
16 @# Install the /etc/init.d/zfs-import script.
17 ifeq ($(LSB_DISTRIBUTOR),Debian)
18 dh_installinit -pzfsutils --onlyscripts --name=zfs-import \
19 - --no-restart-on-upgrade --no-start -- start 07 S . stop 07 0 1 6 .
20 + --no-restart-on-upgrade --no-start
21 else
22 dh_installinit -pzfsutils --onlyscripts --name=zfs-import \
23 --no-restart-on-upgrade --no-start
24 @@ -123,21 +123,23 @@ endif
25 ifeq ($(LSB_DISTRIBUTOR),Debian)
26 @# Debian runs local mounts at sysv sequences [10..12] [08..09].
27 dh_installinit -pzfsutils --onlyscripts --name=zfs-mount \
28 - --no-restart-on-upgrade --no-start -- start 02 2 3 4 5 . stop 06 0 1 6 .
29 + --no-restart-on-upgrade --no-start
30 else
31 dh_installinit -pzfsutils --onlyscripts --name=zfs-mount \
32 --no-restart-on-upgrade --no-start
33 endif
34
35 - @# Install the ZED init file.
36 - dh_installinit -pzfsutils --onlyscripts --name=zfs-zed \
37 - --no-restart-on-upgrade --no-start -- start 07 2 3 4 5 . stop 08 0 1 6 .
38 + # zed is started with systemd zed.service
39 + # so do not install zfs-zed init script
40 + #@# Install the ZED init file.
41 + #dh_installinit -pzfsutils --onlyscripts --name=zfs-zed \
42 + # --no-restart-on-upgrade --no-start
43
44 @# Install the /etc/init.d/zfs-share script.
45 ifeq ($(LSB_DISTRIBUTOR),Debian)
46 @# Debian runs nfs-kernel-server at sysv sequence 17 01.
47 dh_installinit -pzfsutils --onlyscripts --name=zfs-share \
48 - --no-restart-on-upgrade --no-start -- start 27 2 3 4 5 . stop 05 0 1 6 .
49 + --no-restart-on-upgrade --no-start
50 else ifeq ($(LSB_DISTRIBUTOR),Ubuntu)
51 @# Ubuntu runs nfs-kernel-server at sysv sequence 20 80.
52 @# iscsitarget at 20 20, and samba through upstart.
53 Index: new/debian/zfsutils.install
54 ===================================================================
55 --- new.orig/debian/zfsutils.install
56 +++ new/debian/zfsutils.install
57 @@ -1,9 +1,5 @@
58 ../tree/zfsutils/* /
59 contrib/bash_completion.d/zfs /etc/bash_completion.d/
60 -contrib/sysv-init/zfs-import /etc/init.d/
61 -contrib/sysv-init/zfs-mount /etc/init.d/
62 -contrib/sysv-init/zfs-share /etc/init.d/
63 -contrib/sysv-init/zfs-zed /etc/init.d/
64 lib/udev
65 sbin
66 usr/share/man
67 Index: new/debian/zfsutils.postinst
68 ===================================================================
69 --- new.orig/debian/zfsutils.postinst
70 +++ new/debian/zfsutils.postinst
71 @@ -10,6 +10,10 @@ then
72 dpkg-maintscript-helper rm_conffile /etc/default/zfsload -- "$@"
73 dpkg-maintscript-helper rm_conffile /etc/init.d/zfs -- "$@"
74 dpkg-maintscript-helper rm_conffile /etc/init.d/zed -- "$@"
75 + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-zed -- "$@"
76 + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-mount -- "$@"
77 + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-share -- "$@"
78 + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-import -- "$@"
79 fi
80
81 #DEBHELPER#
82 Index: new/debian/zfsutils.preinst
83 ===================================================================
84 --- new.orig/debian/zfsutils.preinst
85 +++ new/debian/zfsutils.preinst
86 @@ -6,6 +6,10 @@ then
87 dpkg-maintscript-helper rm_conffile /etc/default/zfsload -- "$@"
88 dpkg-maintscript-helper rm_conffile /etc/init.d/zfs -- "$@"
89 dpkg-maintscript-helper rm_conffile /etc/init.d/zed -- "$@"
90 + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-zed -- "$@"
91 + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-mount -- "$@"
92 + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-share -- "$@"
93 + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-import -- "$@"
94 fi
95
96 #DEBHELPER#