From 544f7184f8541bbfd7c739f7e01fc9b5b6e57c5e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 26 May 2015 14:06:36 -0700 Subject: [PATCH] Use ExecStartPre to load zfs modules Commit 87abfcb broke the systemd import service by treating the ExecStart line as if it were a shell command that could be executed. This isn't the way systemd works and the correct way to handle this case is with ExecStartPre. This patch updates the zfs import service files accordingly, Signed-off-by: Brian Behlendorf Signed-off-by: Steven Noonan Signed-off-by: Chris Siebenmann Closes #3440 --- etc/systemd/system/zfs-import-cache.service.in | 3 ++- etc/systemd/system/zfs-import-scan.service.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in index b9cca2b299..b1deb6ed96 100644 --- a/etc/systemd/system/zfs-import-cache.service.in +++ b/etc/systemd/system/zfs-import-cache.service.in @@ -9,4 +9,5 @@ ConditionPathExists=@sysconfdir@/zfs/zpool.cache [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/sbin/modprobe zfs && @sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN +ExecStartPre=/sbin/modprobe zfs +ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in index 1e7e1e4735..517e12e3a2 100644 --- a/etc/systemd/system/zfs-import-scan.service.in +++ b/etc/systemd/system/zfs-import-scan.service.in @@ -9,4 +9,5 @@ ConditionPathExists=!@sysconfdir@/zfs/zpool.cache [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/sbin/modprobe zfs && @sbindir@/zpool import -d /dev/disk/by-id -aN +ExecStartPre=/sbin/modprobe zfs +ExecStart=@sbindir@/zpool import -d /dev/disk/by-id -aN