forked from ungleich-public/cdist
Migrated to using present/absent for --state param.
This commit is contained in:
parent
b7e3378262
commit
377afe8b1c
2 changed files with 4 additions and 4 deletions
|
@ -90,7 +90,7 @@ execcmd(){
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -n "$curr_version" ]; then # PKG *is* installed
|
if [ -n "$curr_version" ]; then # PKG *is* installed
|
||||||
if [ "$state" = "removed" ]; then # Shouldn't be installed
|
if [ "$state" = "absent" ]; then # Shouldn't be installed
|
||||||
if [ -n "$flavor" ]; then
|
if [ -n "$flavor" ]; then
|
||||||
cmd="${rm_cmd} ${name}-${flavor}-${curr_version}"
|
cmd="${rm_cmd} ${name}-${flavor}-${curr_version}"
|
||||||
else
|
else
|
||||||
|
@ -115,9 +115,9 @@ if [ -n "$curr_version" ]; then # PKG *is* installed
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else # PKG *isn't* installed
|
else # PKG *isn't* installed
|
||||||
if [ "$state" = "removed" ]; then # Shouldn't be installed
|
if [ "$state" = "absent" ]; then # Shouldn't be installed
|
||||||
exit 0
|
exit 0
|
||||||
elif [ "$state" = "installed" ]; then # Is not currently installed, should be
|
elif [ "$state" = "present" ]; then # Is not currently installed, should be
|
||||||
if [ -n "$flavor" ]; then
|
if [ -n "$flavor" ]; then
|
||||||
cmd="${add_cmd} -r ${name}-${flavor}"
|
cmd="${add_cmd} -r ${name}-${flavor}"
|
||||||
else
|
else
|
||||||
|
|
|
@ -16,7 +16,7 @@ This type is usually used on FreeBSD to manage packages.
|
||||||
REQUIRED PARAMETERS
|
REQUIRED PARAMETERS
|
||||||
-------------------
|
-------------------
|
||||||
state::
|
state::
|
||||||
Either "installed" or "removed".
|
Either "present" or "absent".
|
||||||
|
|
||||||
|
|
||||||
OPTIONAL PARAMETERS
|
OPTIONAL PARAMETERS
|
||||||
|
|
Loading…
Reference in a new issue