change logerror to logerr

This commit is contained in:
Jakobus Schürz 2022-09-28 01:28:12 +02:00
parent 1b1defbbea
commit 94bd6ddb44

View file

@ -197,11 +197,11 @@ mencfs () {
[ -z ${DESTDIR+x} ] && DESTDIR="$(dirname $ENCDIR)/$(basename $ENCDIR| tr '[:lower:]' '[:upper:]'| sed -e 's/^\.//')"
logdebug "DESTDIR: $DESTDIR"
[ -d "$DESTDIR" ] || mkdir -p "$DESTDIR"
$PASS "${PKEY}" 1>/dev/null 2>&1 || { logerror "entry $PKEY does not exist in passwordsotre"; return 5; }
$PASS "${PKEY}" 1>/dev/null 2>&1 || { logerr "entry $PKEY does not exist in passwordsotre"; return 5; }
local ENCFS_PASSWORD=$($PASS show "${PKEY}"|head -n1)
if [ -z ${ENCDIR+x} -a -d ${ENCDIR} ];then
logerror "no encrypted directory found -> exit"
logerr "no encrypted directory found -> exit"
EXIT
return 4
else
@ -396,7 +396,7 @@ EOF
# local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=auto -o ControlPersist=20s -o ControlPath=~/.ssh/master-%C"
# #local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=yes -o ControlPersist=10s -o ControlPath=~/.ssh/ssh-%C"
# # Read /etc/bashrc or /etc/bash.bashrc (depending on distribution) and /etc/profile.d/*.sh first
# #ssh -T ${SSH_OPTS} $@ "pwd" >/dev/null 2>/dev/null || { logerror "Server $@ not reachable -> exit"; return 1; }
# #ssh -T ${SSH_OPTS} $@ "pwd" >/dev/null 2>/dev/null || { logerr "Server $@ not reachable -> exit"; return 1; }
# cat << EOF >> "${TMPBASHCONFIG}"
#[ -e /etc/bashrc ] && BASHRC=/etc/bashrc
#[ -e /etc/bash.bashrc ] && BASHRC=/etc/bash.bashrc
@ -965,9 +965,9 @@ setloglevel () {
if [[ ${loglevels[*]} =~ "${1^^}" ]]; then
export LOGLEVEL=${1^^}
else
logerror "LOGLEVEL must be one of ERROR, WARN, INFO, DEBUG or TRACE"
logerr "LOGLEVEL must be one of ERROR, WARN, INFO, DEBUG or TRACE"
fi
logerror "change LOGLEVEL from $oldloglevel -> $LOGLEVEL"
logerr "change LOGLEVEL from $oldloglevel -> $LOGLEVEL"
EXIT
}
@ -980,9 +980,9 @@ setfileloglevel () {
if [[ ${loglevels[*]} =~ "$1" ]]; then
export FILELOGLEVEL=$1
else
logerror "FILELOGLEVEL must be one of ERROR, WARN, INFO, DEBUG or TRACE"
logerr "FILELOGLEVEL must be one of ERROR, WARN, INFO, DEBUG or TRACE"
fi
logerror "change FILELOGLEVEL from $oldloglevel -> $FILELOGLEVEL"
logerr "change FILELOGLEVEL from $oldloglevel -> $FILELOGLEVEL"
EXIT
}