diff options
author | Brian Behlendorf <[email protected]> | 2015-05-26 14:06:36 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-05-26 16:18:50 -0700 |
commit | 544f7184f8541bbfd7c739f7e01fc9b5b6e57c5e (patch) | |
tree | bd65e7bb4e165fca1b960212afcecfa760664af7 /etc/systemd | |
parent | 65037d9b25c2bfa98d0aa5c9e34678127c03b345 (diff) |
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 <[email protected]>
Signed-off-by: Steven Noonan <[email protected]>
Signed-off-by: Chris Siebenmann <[email protected]>
Closes #3440
Diffstat (limited to 'etc/systemd')
-rw-r--r-- | etc/systemd/system/zfs-import-cache.service.in | 3 | ||||
-rw-r--r-- | 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 b9cca2b29..b1deb6ed9 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 1e7e1e473..517e12e3a 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 |