Skip to content
Snippets Groups Projects
Commit 2a260f08 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

show errors on STDERR

parent 8b9bafb9
No related branches found
No related tags found
1 merge request!27Eliminate scheduler
......@@ -91,7 +91,7 @@ do
echo "Param: setting to AUTO on duplicity"
echo "$2" | grep "^[1-9][0-9]*[a-zA-Z]$" 2>/dev/null
if [ $? -ne 0 ]; then
echo "ERROR: the value after $1 must be a number and a letter (for unit); i.e. 1M for 1 month"
>&2 echo "ERROR: the value after $1 must be a number and a letter (for unit); i.e. 1M for 1 month"
exit 1
else
JOBDEF_TYPE=auto
......@@ -112,7 +112,7 @@ do
bStart=1
;;
*)
echo "ERROR: parameter [$1] is unknown"
>&2 echo "ERROR: parameter [$1] is unknown"
showHelp
exit 1
esac
......
......@@ -47,7 +47,7 @@ function j_init(){
if [ ! -d "${DIR_JOBS}" ]; then
# mkdir -p ${DIR_JOBS} && echo "INFO: dir created ${DIR_JOBS}"
echo "ERROR: missing jobs directory. Aborting."
>&2 echo "ERROR: missing jobs directory. Aborting."
exit 1
fi
......@@ -169,7 +169,7 @@ function j_getSafename(){
# ------------------------------------------------------------
function _j_getvar(){
if [ ! -r "${1}" ]; then
echo "ERROR: cannot read file: ${1}. Abort."
>&2 echo "ERROR: cannot read file: ${1}. Abort."
exit 100
fi
grep "^${2}\ =\ " < "${1}"| cut -f 3- -d " "
......@@ -373,7 +373,7 @@ function j_requireProcess(){
function j_requireUser(){
sUser=$(id | cut -f 2 -d "(" | cut -f 1 -d ")")
if [[ "$sUser" != "$1" ]]; then
echo "ERROR: user $1 is reqired."
>&2 echo "ERROR: user $1 is reqired."
exit 5
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment