--- tools/cibsecret.in.orig 2021-08-14 12:21:28 UTC +++ tools/cibsecret.in @@ -152,8 +152,8 @@ info() { } check_env() { - which md5sum >/dev/null 2>&1 || - fatal $CRM_EX_NOT_INSTALLED "please install md5sum to run $PROG" + which md5 >/dev/null 2>&1 || + fatal $CRM_EX_NOT_INSTALLED "please install md5 to run $PROG" if which pssh >/dev/null 2>&1; then rsh=pssh_fun rcp_to_from=pscp_fun @@ -328,8 +328,8 @@ localfiles() { ;; set) - LF_SUM="$(printf %s "$LF_VALUE" | md5sum)" || - fatal $CRM_EX_ERROR "md5sum failed to produce hash for resource $LF_RSC parameter $LF_PARAM" + LF_SUM="$(printf %s "$LF_VALUE" | md5)" || + fatal $CRM_EX_ERROR "md5 failed to produce hash for resource $LF_RSC parameter $LF_PARAM" LF_SUM="$(echo "$LF_SUM" | awk '{print $1}')" mkdir -p "$(dirname "$LF_FILE")" && echo "$LF_VALUE" > "$LF_FILE" && @@ -370,7 +370,7 @@ cibsecret_check() { [ "$CSC_LOCAL_SUM" ] || fatal $CRM_EX_OSFILE "no MD5 hash for resource $rsc parameter $param" CSC_LOCAL_VALUE="$(localfiles get "$rsc" "$param")" - CSC_CALC_SUM="$(printf "%s" "$CSC_LOCAL_VALUE" | md5sum | awk '{print $1}')" + CSC_CALC_SUM="$(printf "%s" "$CSC_LOCAL_VALUE" | md5 | awk '{print $1}')" [ "$CSC_CALC_SUM" = "$CSC_LOCAL_SUM" ] || fatal $CRM_EX_DIGEST "MD5 hash mismatch for resource $rsc parameter $param" }