From 96e1dd2b17f74e59b93d193b15a9196da6232f46 Mon Sep 17 00:00:00 2001 From: Michael Weiser Date: Thu, 28 Feb 2019 13:08:26 +0000 Subject: Fix password change dash compatibility The echo builtin of dash has no -n option. Flatten echoing of the password to two consecutive standard echos in a group command so output can be piped to passwd in order to achive the required newlines in the output. --- src/usr/share/laps/laps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usr/share/laps/laps.sh b/src/usr/share/laps/laps.sh index efdf76d..1209f65 100755 --- a/src/usr/share/laps/laps.sh +++ b/src/usr/share/laps/laps.sh @@ -376,7 +376,7 @@ wrapper_change_password() { then echo "0" > "${LAPS_PASSWORD_STATUS_TMPFILE}" else - ___wcp_stdout="$( echo -e "$(echo ${___wcp_phrase})\n$(echo ${___wcp_phrase})" | "${___wcp_passwd_bin}" "${___wcp_user}" ; echo "$?" > "${LAPS_PASSWORD_STATUS_TMPFILE}" )" + ___wcp_stdout="$( { echo "${___wcp_phrase}" ; echo "${___wcp_phrase}" ; } | "${___wcp_passwd_bin}" "${___wcp_user}" ; echo "$?" > "${LAPS_PASSWORD_STATUS_TMPFILE}" )" fi ___wcp_passwd_result="$( cat "${LAPS_PASSWORD_STATUS_TMPFILE}" )" -- cgit