forked from Telodendria/Telodendria
Move getent check to common.sh
This commit is contained in:
parent
dd1b26bad8
commit
2b77681763
2 changed files with 1 additions and 7 deletions
|
@ -242,12 +242,6 @@ recipe_patch() {
|
||||||
MXID="@${USER}:$(hostname)"
|
MXID="@${USER}:$(hostname)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If the user has not set their DISPLAY_NAME, try to deduce it
|
|
||||||
# from their system.
|
|
||||||
if [ -z "$DISPLAY_NAME" ] && which getent > /dev/null 2>&1; then
|
|
||||||
DISPLAY_NAME=$(getent passwd "$USER" | cut -d ':' -f 5 | cut -d ',' -f 1)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If the user has not set their EDITOR, use a safe default.
|
# If the user has not set their EDITOR, use a safe default.
|
||||||
# (vi should be available on any POSIX system)
|
# (vi should be available on any POSIX system)
|
||||||
if [ -z "$EDITOR" ]; then
|
if [ -z "$EDITOR" ]; then
|
||||||
|
|
|
@ -10,7 +10,7 @@ if [ -z "$MXID" ]; then
|
||||||
MXID="@${USER}:$(hostname)"
|
MXID="@${USER}:$(hostname)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$DISPLAY_NAME" ]; then
|
if [ -z "$DISPLAY_NAME" ] && which getent > /dev/null 2>&1; then
|
||||||
DISPLAY_NAME=$(getent passwd "$USER" | cut -d ':' -f 5 | cut -d ',' -f 1)
|
DISPLAY_NAME=$(getent passwd "$USER" | cut -d ':' -f 5 | cut -d ',' -f 1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue