Merge branch 'fix/type/__key_value/solaris-awk' into 'master'
__key_value: Get AWK from POSIX PATH See merge request ungleich-public/cdist!913
This commit is contained in:
commit
1b18b9487e
3 changed files with 8 additions and 3 deletions
|
@ -40,7 +40,9 @@ else
|
||||||
fi
|
fi
|
||||||
export key state delimiter value exact_delimiter
|
export key state delimiter value exact_delimiter
|
||||||
|
|
||||||
awk -f - "$file" <<"AWK_EOF"
|
awk_bin=$(PATH=$(getconf PATH 2>/dev/null) && command -v awk || echo awk)
|
||||||
|
|
||||||
|
"${awk_bin}" -f - "$file" <<"AWK_EOF"
|
||||||
BEGIN {
|
BEGIN {
|
||||||
state=ENVIRON["state"]
|
state=ENVIRON["state"]
|
||||||
key=ENVIRON["key"]
|
key=ENVIRON["key"]
|
||||||
|
|
|
@ -24,7 +24,10 @@ if [ -f "$file" ]; then
|
||||||
else
|
else
|
||||||
touch "$file"
|
touch "$file"
|
||||||
fi
|
fi
|
||||||
awk -f - "$file" >"$tmpfile" <<"AWK_EOF"
|
|
||||||
|
awk_bin=$(PATH=$(getconf PATH 2>/dev/null) && command -v awk || echo awk)
|
||||||
|
|
||||||
|
"${awk_bin}" -f - "$file" >"$tmpfile" <<"AWK_EOF"
|
||||||
BEGIN {
|
BEGIN {
|
||||||
# import variables in a secure way ..
|
# import variables in a secure way ..
|
||||||
state=ENVIRON["state"]
|
state=ENVIRON["state"]
|
||||||
|
|
|
@ -25,7 +25,7 @@ state_should="$(cat "$__object/parameter/state")"
|
||||||
state_is="$(cat "$__object/explorer/state")"
|
state_is="$(cat "$__object/explorer/state")"
|
||||||
fire_onchange=''
|
fire_onchange=''
|
||||||
|
|
||||||
if [ "$state_is" = "$state_should" ]; then
|
if [ "$state_is" = "$state_should" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue