aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weiser <michael.weiser@gmx.de>2019-02-28 13:08:26 +0000
committerMichael Weiser <michael.weiser@gmx.de>2019-02-28 15:10:58 +0000
commit96e1dd2b17f74e59b93d193b15a9196da6232f46 (patch)
tree77064809370214da9af8038d24b387f68e314983
parentHandle empty password change timestamp LDAP attribute (diff)
downloadlaps-96e1dd2b17f74e59b93d193b15a9196da6232f46.tar.gz
laps-96e1dd2b17f74e59b93d193b15a9196da6232f46.tar.bz2
laps-96e1dd2b17f74e59b93d193b15a9196da6232f46.zip
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.
-rwxr-xr-xsrc/usr/share/laps/laps.sh2
1 files changed, 1 insertions, 1 deletions
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}" )"
bgstack15