]> git.proxmox.com Git - zfsonlinux.git/blame - zfs-patches/0037-Allow-modprobe-to-fail-when-called-within-systemd.patch
bump version to 0.7.7-pve1~bpo9
[zfsonlinux.git] / zfs-patches / 0037-Allow-modprobe-to-fail-when-called-within-systemd.patch
CommitLineData
75b07eca
FG
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Matthew Thode <mthode@mthode.org>
3Date: Wed, 21 Feb 2018 22:45:35 +0000
4Subject: [PATCH] Allow modprobe to fail when called within systemd
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9This allows for systems with zfs built into the kernel manually to run
10these services. Otherwise the service will fail to start.
11
12Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
13Reviewed-by: Kash Pande <kash@tripleback.net>
14Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
15Signed-off-by: Matthew Thode <mthode@mthode.org>
16Closes #7174
17(cherry picked from commit 30ac8de48a2bb680e15dfe8879faaa7b461b771c)
18Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
19---
20 etc/systemd/system/zfs-import-cache.service.in | 2 +-
21 etc/systemd/system/zfs-import-scan.service.in | 2 +-
22 2 files changed, 2 insertions(+), 2 deletions(-)
23
24diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in
25index 9d677f8dd..726c468ca 100644
26--- a/etc/systemd/system/zfs-import-cache.service.in
27+++ b/etc/systemd/system/zfs-import-cache.service.in
28@@ -12,7 +12,7 @@ ConditionPathExists=@sysconfdir@/zfs/zpool.cache
29 [Service]
30 Type=oneshot
31 RemainAfterExit=yes
32-ExecStartPre=/sbin/modprobe zfs
33+ExecStartPre=-/sbin/modprobe zfs
34 ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN
35
36 [Install]
37diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in
38index cc428b0d0..8fe2c1072 100644
39--- a/etc/systemd/system/zfs-import-scan.service.in
40+++ b/etc/systemd/system/zfs-import-scan.service.in
41@@ -11,7 +11,7 @@ ConditionPathExists=!@sysconfdir@/zfs/zpool.cache
42 [Service]
43 Type=oneshot
44 RemainAfterExit=yes
45-ExecStartPre=/sbin/modprobe zfs
46+ExecStartPre=-/sbin/modprobe zfs
47 ExecStart=@sbindir@/zpool import -aN -d /dev/disk/by-id -o cachefile=none
48
49 [Install]
50--
512.14.2
52