Commit 58eb474b authored by Dennis Camera's avatar Dennis Camera

[__sensible_editor] Add exists as a possible --state value

parent 365974c4
......@@ -24,7 +24,15 @@ editor
OPTIONAL PARAMETERS
-------------------
state
Either "present" or "absent". Defaults to "present".
'present', 'absent', or 'exists'. Defaults to 'present', where:
present
the sensible-editor is exactly what is specified in --editor.
absent
no sensible-editor configuration is present.
exists
the sensible-editor will be set to what is specified in --editor,
unless there already is a configuration on the target system.
EXAMPLES
......
......@@ -47,9 +47,9 @@ os_version=$(cat "${__global}/explorer/os_version")
state=$(cat "${__object}/parameter/state")
user=$__object_id
if test "${state}" != 'present' && test "${state}" != 'absent'
if test "${state}" != 'present' && test "${state}" != 'exists' && test "${state}" != 'absent'
then
echo 'Only "present" and "absent" are allowed for --state' >&2
echo 'Only "present", "exists", and "absent" are allowed for --state' >&2
exit 1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment