diff options
author | Georgy Yakovlev <[email protected]> | 2018-03-30 11:05:24 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-03-30 12:05:24 -0700 |
commit | 2f291ebaed21090afd784f3b376dcb11465a37df (patch) | |
tree | 8404195b458b4a36f2845d7143b50d7ed1182278 | |
parent | 5e00213e430fe9103e263514490d55d10075908e (diff) |
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 <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Georgy Yakovlev <[email protected]>
Closes #7346
Closes #7347
-rw-r--r-- | etc/init.d/zfs-functions.in | 2 |
1 files changed, 2 insertions, 0 deletions
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" |