]> git.proxmox.com Git - zfsonlinux.git/blob - 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
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Matthew Thode <mthode@mthode.org>
3 Date: Wed, 21 Feb 2018 22:45:35 +0000
4 Subject: [PATCH] Allow modprobe to fail when called within systemd
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 This allows for systems with zfs built into the kernel manually to run
10 these services. Otherwise the service will fail to start.
11
12 Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
13 Reviewed-by: Kash Pande <kash@tripleback.net>
14 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
15 Signed-off-by: Matthew Thode <mthode@mthode.org>
16 Closes #7174
17 (cherry picked from commit 30ac8de48a2bb680e15dfe8879faaa7b461b771c)
18 Signed-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
24 diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in
25 index 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]
37 diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in
38 index 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 --
51 2.14.2
52