diff options
author | наб <[email protected]> | 2021-04-19 19:52:44 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-04-19 15:22:58 -0700 |
commit | 478b8ec8f218f2271b8b9c5e88022b636eb72073 (patch) | |
tree | 15d667f8af27cca0df2ecd1e034d7c37a8bb9c40 /etc | |
parent | 219acd907bf041b7c42b3c8874e22c5b86bafcb2 (diff) |
etc/systemd/zfs-mount-generator: don't fail if no cached pools
If $FSLIST exists but is empty, the generator fails with
sort: cannot read: '/etc/zfs/zfs-list.cache/*':
No such file or directory
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #11915
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/systemd/system-generators/zfs-mount-generator.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/etc/systemd/system-generators/zfs-mount-generator.in b/etc/systemd/system-generators/zfs-mount-generator.in index 28439f424..c276fbbce 100755 --- a/etc/systemd/system-generators/zfs-mount-generator.in +++ b/etc/systemd/system-generators/zfs-mount-generator.in @@ -28,6 +28,7 @@ set -e FSLIST="@sysconfdir@/zfs/zfs-list.cache" [ -d "${FSLIST}" ] || exit 0 +[ "$(echo "${FSLIST}"/*)" = "${FSLIST}/*" ] && exit 0 do_fail() { printf 'zfs-mount-generator: %s\n' "$*" > /dev/kmsg |