Move getent check to common.sh

This commit is contained in:
Jordan Bancino 2023-03-01 03:11:10 +00:00
parent dd1b26bad8
commit 2b77681763
2 changed files with 1 additions and 7 deletions

View file

@ -242,12 +242,6 @@ recipe_patch() {
MXID="@${USER}:$(hostname)"
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.
# (vi should be available on any POSIX system)
if [ -z "$EDITOR" ]; then

View file

@ -10,7 +10,7 @@ if [ -z "$MXID" ]; then
MXID="@${USER}:$(hostname)"
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)
fi