diff options
-rwxr-xr-x | src/usr/share/laps/laps.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/usr/share/laps/laps.sh b/src/usr/share/laps/laps.sh index 15280d3..efdf76d 100755 --- a/src/usr/share/laps/laps.sh +++ b/src/usr/share/laps/laps.sh @@ -215,8 +215,11 @@ wrapper_get_timestamp_from_ldap() { ___wgtfl_krb5cc_tmpfile="${7}" ts_filetime="$( get_attrib_from_ldap "${___wgtfl_ldapsearch_bin}" "${___wgtfl_ldapsearch_flags}" "${___wgtfl_ldapsearch_filter}" "${___wgtfl_attrib}" "${___wgtfl_ldapconf}" "${___wgtfl_krb5cc_tmpfile}" )" - debuglev 3 && ferror "timestamp(FILETIME): ${ts_filetime}" - ts_epoch="$( "${___wgtfl_datetime_py}" -e "${ts_filetime}" )" + ts_epoch=0 + if test -n "$ts_filetime" ; then + debuglev 3 && ferror "timestamp(FILETIME): ${ts_filetime}" + ts_epoch="$( "${___wgtfl_datetime_py}" -e "${ts_filetime}" )" + fi debuglev 2 && ferror "timestamp(epoch): ${ts_epoch}" debuglev 1 && ferror "timestamp(UTC): $( date -u -d "@${ts_epoch}" "+%FT%TZ" )" |