mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-29 12:29:35 +03:00
d32d25c5c2
The mount(8) command will helpfully try to resolve any device name which is passed in. It does this by applying some simple heuristics before passing it along to the registered mount helper. Normally this fine. However, one of these heuristics is to prepend the current working directory to the passed device name. If that resulting directory name exists mount(8) will perform the mount(2) system call and never invoke the helper utility. Since the cwd for systemd when running as the system instance is the root directory the default mount points created by zfs(8) can cause a mount failure. This change avoids the issue by explicitly setting the cwd to a different path when performing the mount. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #5719
19 lines
375 B
SYSTEMD
19 lines
375 B
SYSTEMD
[Unit]
|
|
Description=Mount ZFS filesystems
|
|
DefaultDependencies=no
|
|
After=systemd-udev-settle.service
|
|
After=zfs-import-cache.service
|
|
After=zfs-import-scan.service
|
|
After=systemd-remount-fs.service
|
|
Before=local-fs.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=@sbindir@/zfs mount -a
|
|
WorkingDirectory=-/sbin/
|
|
|
|
[Install]
|
|
WantedBy=zfs-share.service
|
|
WantedBy=zfs.target
|