]> git.proxmox.com Git - zfsonlinux.git/commitdiff
use systemd
authorDietmar Maurer <dietmar@proxmox.com>
Sun, 15 Mar 2015 14:38:33 +0000 (15:38 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Sun, 15 Mar 2015 14:52:02 +0000 (15:52 +0100)
zfs-debian-pve/rules
zfs-debian-pve/zfsutils.install
zfs-debian-pve/zfsutils.zfs-mount.init [deleted file]
zfs-debian-pve/zfsutils.zfs-share.init [deleted file]

index be2eda271c29a9e850f151321e931b5d9eb724a7..3148f0cb4d0bc684733709206f029c851dee3382 100755 (executable)
@@ -13,7 +13,7 @@ REVISION := $(shell dpkg-parsechangelog \
 META_DISTDIR := $(CURDIR)/$(META_NAME)-$(VERSION)/
 
 %:
-       dh $@ --with autoreconf,dkms
+       dh $@ --with autoreconf,dkms,systemd
 
 override_dh_auto_configure:
        @# Embed the downstream version in the module.
@@ -27,6 +27,8 @@ override_dh_auto_configure:
          --bindir=/bin \
          --sbindir=/sbin \
          --libdir=/lib \
+         --with-systemdunitdir=/lib/systemd/system \
+         --with-systemdpresetdir=/lib/systemd/system-preset \
          --with-udevdir=/lib/udev \
          --with-config=user
 
@@ -88,19 +90,25 @@ override_dh_install:
 override_dh_installdocs:
        dh_installdocs --link-doc=zfs-doc
 
+#override_dh_systemd_enable:
+#      dh_systemd_enable -pzfsutils --name 
+
+#override_dh_systemd_start:
+#      dh_systemd_start -pcorosync-pve --name corosync --no-start
+
 override_dh_installinit:
-       @# Install debian/zfsutils.zfs.default as /etc/default/zfs.
-       dh_installinit --name=zfs
-
-       @# Install the /etc/init.d/zfs-mount script.
-       @# Debian runs local mounts at sysv sequences [10..12] [08..09].
-       dh_installinit --name=zfs-mount \
-         --no-restart-on-upgrade --no-start -- defaults 13 07
-
-       @# Debian runs nfs-kernel-server at sysv sequence 17 01,
-       @# iscsitarget at 02 01, and samba at 01 02.
-       dh_installinit --name=zfs-share \
-         --no-restart-on-upgrade --no-start -- defaults 18 00
+#      @# Install debian/zfsutils.zfs.default as /etc/default/zfs.
+#      dh_installinit --name=zfs
+
+#      @# Install the /etc/init.d/zfs-mount script.
+#      @# Debian runs local mounts at sysv sequences [10..12] [08..09].
+#      dh_installinit --name=zfs-mount \
+#        --no-restart-on-upgrade --no-start -- defaults 13 07
+
+#      @# Debian runs nfs-kernel-server at sysv sequence 17 01,
+#      @# iscsitarget at 02 01, and samba at 01 02.
+#      dh_installinit --name=zfs-share \
+#        --no-restart-on-upgrade --no-start -- defaults 18 00
 
 
 override_dh_installudev:
index 35a5bad62f1a8b99b578b0d7aa976c8b6e8ffce0..03dca88d5c2b04149921da38b8912a510cd3e631 100644 (file)
@@ -1,4 +1,6 @@
 ../tree/zfsutils/* /
 sbin
 lib/udev
+lib/systemd
 usr/share/man
+etc/zfs/zed.d/zed.rc
diff --git a/zfs-debian-pve/zfsutils.zfs-mount.init b/zfs-debian-pve/zfsutils.zfs-mount.init
deleted file mode 100644 (file)
index cfe2b31..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-#
-### BEGIN INIT INFO
-# Provides: zvol zfs
-# Required-Start: $local_fs
-# Required-Stop: $local_fs
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Mount ZFS filesystems
-# Description: Run the `zfs mount -a` or `zfs umount -a` command.
-#              This init script is deprecated and should be disabled in the
-#              /etc/default/zfs options file. Instead, use the zfs-mount
-#              package for Debian or the zfs-mountall package for Ubuntu
-### END INIT INFO
-
-PATH=/sbin:/bin
-
-. /lib/lsb/init-functions
-. /lib/init/vars.sh
-
-[ -f /etc/default/zfs ] && . /etc/default/zfs
-
-do_start()
-{
-       log_begin_msg "Mounting ZFS filesystems"
-       log_progress_msg "filesystems"
-       zfs mount -a
-       RET=$?
-
-       if [ $RET != 0 ] ; then
-               log_end_msg $RET
-               exit $RET
-       fi
-
-       log_end_msg 0
-}
-
-do_stop()
-{
-       log_begin_msg "Unmounting ZFS filesystems"
-       log_progress_msg "filesystems"
-       zfs unmount -a
-       RET=$?
-
-       # Ignore a non-zero `zfs` result so that a busy ZFS instance
-       # does not hang the system during shutdown.
-       if [ $RET != 0 ] ; then
-               log_end_msg $RET
-       fi
-
-       log_end_msg 0
-}
-
-case "$1" in
-       (start)
-               case "$ZFS_MOUNT" in
-                       ([Oo][Ff][Ff]|[Nn][Oo]|'')
-                               exit 0
-                               ;;
-               esac
-               do_start
-               ;;
-       (stop)
-               case "$ZFS_UNMOUNT" in
-                       ([Oo][Ff][Ff]|[Nn][Oo]|'')
-                               exit 0
-                               ;;
-               esac
-               do_stop
-               ;;
-       (force-reload|reload|restart|status)
-               # no-op
-               ;;
-
-       (*)
-               [ -n "$1" ] && echo "Error: Unknown command $1."
-               echo "Usage: $0 {start|stop}"
-               exit 3
-       ;;
-esac
diff --git a/zfs-debian-pve/zfsutils.zfs-share.init b/zfs-debian-pve/zfsutils.zfs-share.init
deleted file mode 100644 (file)
index 843271a..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-
-### BEGIN INIT INFO
-# Provides: shareiscsi sharenfs sharesmb zfs-share
-# Required-Start: $local_fs $network $remote_fs
-# Required-Stop: $local_fs $network $remote_fs
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Should-Start: iscsi iscsitarget istgt nfs-kernel-server samba
-# Should-Stop: iscsi iscsitarget istgt nfs-kernel-server samba
-# Short-Description: Network share OpenZFS datasets.
-# Description: Run the `zfs share -a` or `zfs unmount -a` commands
-#      for controlling iSCSI, NFS, or CIFS network shares.
-### END INIT INFO
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-
-. /lib/lsb/init-functions
-. /lib/init/vars.sh
-
-[ -f /etc/default/zfs ] && . /etc/default/zfs
-
-do_start()
-{
-       log_begin_msg "Sharing OpenZFS filesystems"
-       log_progress_msg "filesystems"
-       zfs share -a
-       RET=$?
-
-       if [ $RET != 0 ] ; then
-               log_end_msg $RET
-               exit $RET
-       fi
-
-       log_end_msg 0
-}
-
-do_stop()
-{
-       log_begin_msg "Unsharing OpenZFS filesystems"
-       log_progress_msg "filesystems"
-       zfs unshare -a
-       RET=$?
-
-       # Ignore a non-zero `zfs` result so that a busy OpenZFS instance
-       # does not hang the system during shutdown.
-       if [ $RET != 0 ] ; then
-               log_end_msg $RET
-       fi
-
-       log_end_msg 0
-}
-
-case "$1" in
-       (start)
-               case "$ZFS_SHARE" in
-                       ([Oo][Ff][Ff]|[Nn][Oo]|'')
-                               exit 0
-                               ;;
-               esac
-               do_start
-               ;;
-       (stop)
-               case "$ZFS_UNSHARE" in
-                       ([Oo][Ff][Ff]|[Nn][Oo]|'')
-                               exit 0
-                               ;;
-               esac
-               do_stop
-               ;;
-       (force-reload|reload|restart|status)
-               # no-op
-               ;;
-
-       (*)
-               [ -n "$1" ] && echo "Error: Unknown command $1."
-               echo "Usage: $0 {start|stop}"
-               exit 3
-       ;;
-esac