have to report absent state no matter what the desired state is

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2012-02-03 22:49:10 +01:00
parent cad2097d05
commit ef81f03e89

View file

@ -29,10 +29,13 @@ value="$(cat "$__object/parameter/value" 2>/dev/null \
case "$state" in
absent)
if egrep -q "^$key$delimiter+" "$file"; then
# if the key exists, with whatever value, we will have to remove it
# so report it as present
if egrep -q "^$key$delimiter+" "$file"; then
echo present
else
# key does not exist
echo absent
fi
;;
present)