forked from ungleich-public/cdist
adjust grep string
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
aedbc263d7
commit
0b7024a2cc
1 changed files with 7 additions and 2 deletions
|
@ -29,15 +29,20 @@ fi
|
|||
|
||||
state="$(cat "$__object/parameter/state")"
|
||||
|
||||
cat "$__object/explorer/pkg_version"
|
||||
|
||||
opts="--assumeyes --quiet"
|
||||
|
||||
not_installed="^no package provides"
|
||||
|
||||
case "$state" in
|
||||
installed)
|
||||
if grep -q "is not installed\$" "$__object/explorer/pkg_version"; then
|
||||
if grep -q "$not_installed" "$__object/explorer/pkg_version"; then
|
||||
echo yum $opts install \"$name\"
|
||||
fi
|
||||
;;
|
||||
uninstalled)
|
||||
if ! grep -q "is not installed\$" "$__object/explorer/pkg_version"; then
|
||||
if ! grep -q "$not_installed" "$__object/explorer/pkg_version"; then
|
||||
echo yum $opts remove \"$name\"
|
||||
fi
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue