]> granicus.if.org Git - zfs/commitdiff
Use ExecStartPre to load zfs modules
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 26 May 2015 21:06:36 +0000 (14:06 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 26 May 2015 23:18:50 +0000 (16:18 -0700)
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 <behlendorf1@llnl.gov>
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Chris Siebenmann <cks.git01@cs.toronto.edu>
Closes #3440

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

index b9cca2b299830bae52bd6a3789bd6846d8864883..b1deb6ed96307678462efd7a00d31ee0dfed4464 100644 (file)
@@ -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
index 1e7e1e4735cf1bf9ddb4ea20ed9ec25899d169fc..517e12e3a26e797c8a07b6f1ec697e2da64f3e5e 100644 (file)
@@ -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