mise au point commandStdoutPattern
This commit is contained in:
@@ -236,10 +236,10 @@ function commandIsWorking {
|
|||||||
# arg2: command
|
# arg2: command
|
||||||
# arg3: pattern
|
# arg3: pattern
|
||||||
function commandStdoutPattern {
|
function commandStdoutPattern {
|
||||||
chroot=$1
|
local chroot=$1
|
||||||
command=$2
|
local command=$2
|
||||||
shift
|
local pattern="$3"
|
||||||
pattern=$@
|
|
||||||
result=$(chroot ${chroot} bash -c "$command")
|
result=$(chroot ${chroot} bash -c "$command")
|
||||||
if ( echo -n "$result" | grep -qiE "${pattern}" ) ; then echo -ne "1;" ; else echo -ne "0;" ; fi
|
if ( echo -n "$result" | grep -qiE "${pattern}" ) ; then echo -ne "1;" ; else echo -ne "0;" ; fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user