aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorMatthew Thode <[email protected]>2018-02-21 22:45:35 +0000
committerBrian Behlendorf <[email protected]>2018-02-21 14:45:35 -0800
commita2819058f5c2dc03f34114aa716ec5a5db7f07bd (patch)
tree11723fc64cd13d1e7cbc6cec6591524d5b907deb /etc
parentca0b37660486e417e8067edc23b4b7e9e1ff71e8 (diff)
Allow modprobe to fail when called within systemd
This allows for systems with zfs built into the kernel manually to run these services. Otherwise the service will fail to start. Reviewed-by: loli10K <[email protected]> Reviewed-by: Kash Pande <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matthew Thode <[email protected]> Closes #7174
Diffstat (limited to 'etc')
-rw-r--r--etc/systemd/system/zfs-import-cache.service.in2
-rw-r--r--etc/systemd/system/zfs-import-scan.service.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in
index 308ced69d..23c725d71 100644
--- a/etc/systemd/system/zfs-import-cache.service.in
+++ b/etc/systemd/system/zfs-import-cache.service.in
@@ -12,7 +12,7 @@ ConditionPathExists=@sysconfdir@/zfs/zpool.cache
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStartPre=/sbin/modprobe zfs
+ExecStartPre=-/sbin/modprobe zfs
ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN
ExecStartPost=/bin/bash -c "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | /bin/awk '$1 != \"-\" {print; exit}')"
diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in
index 09eef175e..851d96cbc 100644
--- a/etc/systemd/system/zfs-import-scan.service.in
+++ b/etc/systemd/system/zfs-import-scan.service.in
@@ -11,7 +11,7 @@ ConditionPathExists=!@sysconfdir@/zfs/zpool.cache
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStartPre=/sbin/modprobe zfs
+ExecStartPre=-/sbin/modprobe zfs
ExecStart=@sbindir@/zpool import -aN -o cachefile=none
ExecStartPost=/bin/bash -c "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | /bin/awk '$1 != \"-\" {print; exit}')"