]> granicus.if.org Git - zfs/commitdiff
Allow modprobe to fail when called within systemd
authorMatthew Thode <mthode@mthode.org>
Wed, 21 Feb 2018 22:45:35 +0000 (22:45 +0000)
committerTony Hutter <hutter2@llnl.gov>
Wed, 14 Mar 2018 23:10:37 +0000 (16:10 -0700)
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 <ezomori.nozomu@gmail.com>
Reviewed-by: Kash Pande <kash@tripleback.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Thode <mthode@mthode.org>
Closes #7174

etc/systemd/system/zfs-import-cache.service.in
etc/systemd/system/zfs-import-scan.service.in

index 9d677f8dda3873e8b73724678e317931a3e7ed8b..726c468ca30c5f96d778a38b3c817dd9e2705b80 100644 (file)
@@ -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
 
 [Install]
index 227f5b74f36ef6754583416a3c477133ae0380f3..abc8e8e6d94a92a23bde6762aa03aec4579f1189 100644 (file)
@@ -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
 
 [Install]