[__sensible_editor] Add exists as a possible --state value
This commit is contained in:
parent
365974c447
commit
58eb474b01
2 changed files with 11 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue