Skip to content
Snippets Groups Projects
Commit c516812f authored by Steven Murray's avatar Steven Murray
Browse files

delete_archive_file now returns better errno codes

parent 75adea9f
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
EINVAL=22
ECANCELED=125
export XrdSecPROTOCOL=sss
export XrdSecSSSKT=/etc/cta/cta-cli.sss.keytab
if test $# -ne 5; then
echo "Wrong number of command-line arguments"
echo "Usage: delete_archive_file wf_tag rusername rgroupname archive_file_id file_path"
exit -1
exit ${EINVAL}
fi
WF_TAG="$1"
......@@ -27,5 +29,5 @@ if RESULT=`2>&1 /usr/bin/cta deletearchive --user ${RUSERNAME} --group ${RGROUPN
exit 0
else
echo `date +%s` `date`" $0 Failed to delete tape archive file: error=${RESULT} rusername=${RUSERNAME} rgroupname=${RGROUPNAME} archiveFileId=${ARCHIVE_FILE_ID} path=${FILE_PATH}" >> ${LOG_FILE}
exit 1
exit ${ECANCELED}
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment