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 <behlendorf1@llnl.gov> Signed-off-by: Steven Noonan <steven@uplinklabs.net> Signed-off-by: Chris Siebenmann <cks.git01@cs.toronto.edu> Closes #3440
This commit is contained in:
parent
65037d9b25
commit
544f7184f8
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user