Use pattern matching function

The needle argument in this specific case is a pattern, which cannot be
matched by the "literal" string matcher strstr.

This can result in fsck calls like:

    e2fsck -a -y /dev/sda1

Which will then exit with an error like:

    e2fsck: Only one of the options -p/-a, -n or -y may be specified.

Hence, it is necessary to use the strglobin function to correctly match
the pattern.
master
Florian Gamböck 2017-12-18 11:04:05 +01:00
parent 2d3273f96f
commit 63755f4db8
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ fsck_drv_com() {
local _ret
local _out

if ! strstr "$_fop" "-[ynap]"; then
if ! strglobin "$_fop" "-[ynap]"; then
_fop="-a ${_fop}"
fi