summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorGeorgy Yakovlev <[email protected]>2018-03-30 11:05:24 -0800
committerBrian Behlendorf <[email protected]>2018-03-30 12:05:24 -0700
commit2f291ebaed21090afd784f3b376dcb11465a37df (patch)
tree8404195b458b4a36f2845d7143b50d7ed1182278 /etc
parent5e00213e430fe9103e263514490d55d10075908e (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
Diffstat (limited to 'etc')
-rw-r--r--etc/init.d/zfs-functions.in2
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"