diff --git a/cdist/conf/type/__sensible_editor/man.rst b/cdist/conf/type/__sensible_editor/man.rst index b11aff46..9b805e06 100644 --- a/cdist/conf/type/__sensible_editor/man.rst +++ b/cdist/conf/type/__sensible_editor/man.rst @@ -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 diff --git a/cdist/conf/type/__sensible_editor/manifest b/cdist/conf/type/__sensible_editor/manifest index 3a1926b6..d4883403 100644 --- a/cdist/conf/type/__sensible_editor/manifest +++ b/cdist/conf/type/__sensible_editor/manifest @@ -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