From: Matthew Thode Date: Wed, 21 Feb 2018 22:45:35 +0000 (+0000) Subject: Allow modprobe to fail when called within systemd X-Git-Tag: zfs-0.7.7~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30ac8de48a2bb680e15dfe8879faaa7b461b771c;p=zfs 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 Reviewed-by: Kash Pande Reviewed-by: Brian Behlendorf Signed-off-by: Matthew Thode Closes #7174 --- diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in index 9d677f8dd..726c468ca 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 [Install] diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in index 227f5b74f..abc8e8e6d 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 [Install]