From 2f291ebaed21090afd784f3b376dcb11465a37df Mon Sep 17 00:00:00 2001 From: Georgy Yakovlev <168902+gyakovlev@users.noreply.github.com> Date: Fri, 30 Mar 2018 11:05:24 -0800 Subject: [PATCH] zfs-functions: skip lines where mntpnt is 'none' This fixes zfs-mount initscript trying to mount swap volumes as filesystems or anything that has 'none' as a mountpoint in /etc/fstab. Additionally, fixes trying to mount swap volumes as a filesystem on RHEL. RHEL defines mountpoint for swap as `swap`. Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Reviewed-by: George Melikov Signed-off-by: Georgy Yakovlev Closes #7346 Closes #7347 --- etc/init.d/zfs-functions.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/init.d/zfs-functions.in b/etc/init.d/zfs-functions.in index 97f2ea039..f5b74d458 100644 --- a/etc/init.d/zfs-functions.in +++ b/etc/init.d/zfs-functions.in @@ -393,6 +393,8 @@ read_fstab() i=0 while read -r fs mntpnt fstype opts; do echo "$fs" | egrep -qE '^#|^$' && continue + echo "$mntpnt" | egrep -qE '^none|^swap' && continue + echo "$fstype" | egrep -qE '^swap' && continue if echo "$fs $mntpnt $fstype $opts" | grep -qE "$match"; then eval export FSTAB_dev_$i="$fs"