localmount/netmount: clean up critical mount processing

Fix a typo and do not fail if a path in critical_mounts is not listed as
a critical mount does not get mounted.
This commit is contained in:
William Hubbs 2016-04-26 12:43:50 -05:00
parent 5d130cc45c
commit fd80b6fc67
2 changed files with 12 additions and 4 deletions

View File

@ -41,9 +41,13 @@ start()
rc=0
else
for x in ${critical_mounts}; do
mountinfo -q $x || critical=x
fstabinfo -q $x || continue
if ! mountinfo -q $x; then
critical=x
eerror "Failed to mount $x"
fi
done
[-z "$critical" ] && rc=0
[ -z "$critical" ] && rc=0
fi
return $rc
}

View File

@ -46,9 +46,13 @@ start()
rc=0
else
for x in ${critical_mounts}; do
mountinfo -q $x || critical=x
fstabinfo -q $x || continue
if ! mountinfo -q $x; then
critical=x
eerror "Failed to mount $x"
fi
done
[-z "$critical" ] && rc=0
[ -z "$critical" ] && rc=0
fi
return $rc
}