Commit 9a6ca1a3 authored by ssrq's avatar ssrq

[__sensible_editor] Remove mixed error reporting from manifest

parent 9e9c3982
#!/bin/sh
#!/bin/sh -e
#
# 2019 Dennis Camera (dennis.camera at ssrq-sds-fds.ch)
#
......
#!/bin/sh
#!/bin/sh -e
#
# 2019 Dennis Camera (dennis.camera at ssrq-sds-fds.ch)
#
......@@ -22,5 +22,12 @@
#
user=$__object_id
home=$(getent passwd "${user}" | cut -d':' -f6)
getent passwd "${user}" | cut -d':' -f6
if ! test -d "${home}"
then
echo "Cannot find home directory of user ${user}" >&2
exit 1
fi
echo "${home}"
cdist-type__sensible_editor(7)
============================
==============================
NAME
----
......
......@@ -24,10 +24,6 @@ os=$(cat "${__global}/explorer/os")
state=$(cat "${__object}/parameter/state")
user=$__object_id
editor_path=$(cat "${__object}/explorer/editor_path")
user_home=$(cat "${__object}/explorer/user_home")
group=$(cat "${__object}/explorer/group")
case $os
in
debian|devuan|ubuntu)
......@@ -39,17 +35,9 @@ in
;;
esac
if test -z "${user_home}"
then
echo "Could not find ${user}'s home directory." >&2
exit 1
fi
if test -z "${editor_path}"
then
echo "Editor \"$(cat "${__object}/parameter/editor")\" is missing on the target system." >&2
exit 1
fi
editor_path=$(cat "${__object}/explorer/editor_path")
user_home=$(cat "${__object}/explorer/user_home")
group=$(cat "${__object}/explorer/group")
__file "${user_home}/.selected_editor" --state "${state}" \
--owner "${user}" --group "${group}" --mode 0644 \
......
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