Do not install sysv init scripts We use systemd on PVE, so there is no need to install old sysv init scripts. Also, provided scripts are buggy, because they do not include /lib/lsb/init-functions, thus do not call systemctl to start services. Adittionally, service names differ, so some services are started twice (zed => zfs-zed). Index: new/debian/rules =================================================================== --- new.orig/debian/rules +++ new/debian/rules @@ -113,7 +113,7 @@ override_dh_installinit: @# Install the /etc/init.d/zfs-import script. ifeq ($(LSB_DISTRIBUTOR),Debian) dh_installinit -pzfsutils --onlyscripts --name=zfs-import \ - --no-restart-on-upgrade --no-start -- start 07 S . stop 07 0 1 6 . + --no-restart-on-upgrade --no-start else dh_installinit -pzfsutils --onlyscripts --name=zfs-import \ --no-restart-on-upgrade --no-start @@ -123,21 +123,23 @@ endif ifeq ($(LSB_DISTRIBUTOR),Debian) @# Debian runs local mounts at sysv sequences [10..12] [08..09]. dh_installinit -pzfsutils --onlyscripts --name=zfs-mount \ - --no-restart-on-upgrade --no-start -- start 02 2 3 4 5 . stop 06 0 1 6 . + --no-restart-on-upgrade --no-start else dh_installinit -pzfsutils --onlyscripts --name=zfs-mount \ --no-restart-on-upgrade --no-start endif - @# Install the ZED init file. - dh_installinit -pzfsutils --onlyscripts --name=zfs-zed \ - --no-restart-on-upgrade --no-start -- start 07 2 3 4 5 . stop 08 0 1 6 . + # zed is started with systemd zed.service + # so do not install zfs-zed init script + #@# Install the ZED init file. + #dh_installinit -pzfsutils --onlyscripts --name=zfs-zed \ + # --no-restart-on-upgrade --no-start @# Install the /etc/init.d/zfs-share script. ifeq ($(LSB_DISTRIBUTOR),Debian) @# Debian runs nfs-kernel-server at sysv sequence 17 01. dh_installinit -pzfsutils --onlyscripts --name=zfs-share \ - --no-restart-on-upgrade --no-start -- start 27 2 3 4 5 . stop 05 0 1 6 . + --no-restart-on-upgrade --no-start else ifeq ($(LSB_DISTRIBUTOR),Ubuntu) @# Ubuntu runs nfs-kernel-server at sysv sequence 20 80. @# iscsitarget at 20 20, and samba through upstart. Index: new/debian/zfsutils.install =================================================================== --- new.orig/debian/zfsutils.install +++ new/debian/zfsutils.install @@ -1,9 +1,5 @@ ../tree/zfsutils/* / contrib/bash_completion.d/zfs /etc/bash_completion.d/ -contrib/sysv-init/zfs-import /etc/init.d/ -contrib/sysv-init/zfs-mount /etc/init.d/ -contrib/sysv-init/zfs-share /etc/init.d/ -contrib/sysv-init/zfs-zed /etc/init.d/ lib/udev sbin usr/share/man Index: new/debian/zfsutils.postinst =================================================================== --- new.orig/debian/zfsutils.postinst +++ new/debian/zfsutils.postinst @@ -10,6 +10,10 @@ then dpkg-maintscript-helper rm_conffile /etc/default/zfsload -- "$@" dpkg-maintscript-helper rm_conffile /etc/init.d/zfs -- "$@" dpkg-maintscript-helper rm_conffile /etc/init.d/zed -- "$@" + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-zed -- "$@" + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-mount -- "$@" + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-share -- "$@" + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-import -- "$@" fi #DEBHELPER# Index: new/debian/zfsutils.preinst =================================================================== --- new.orig/debian/zfsutils.preinst +++ new/debian/zfsutils.preinst @@ -6,6 +6,10 @@ then dpkg-maintscript-helper rm_conffile /etc/default/zfsload -- "$@" dpkg-maintscript-helper rm_conffile /etc/init.d/zfs -- "$@" dpkg-maintscript-helper rm_conffile /etc/init.d/zed -- "$@" + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-zed -- "$@" + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-mount -- "$@" + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-share -- "$@" + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-import -- "$@" fi #DEBHELPER#