Commit 320e01a3 authored by thomas.forbriger's avatar thomas.forbriger

ThiesDL1 [FIX]: use single-string tag for /bin/logger

Apparently /bin/logger is confused, if the tag parameter contains
several whitespace-separated strings. It behaves very much like the
logger function, if a single string "DL1logger" is passed as tag.
parent d76d15ad
......@@ -31,6 +31,8 @@
#
# ============================================================================
echo "$0" | /bin/logger -i -t "DL1logger" 2>&1
LOGGERBINARY=$HOME/bin/linux/DL1logger
#DLDEVICE=/dev/ttyUSB0
......@@ -45,9 +47,9 @@ DATATYPES=ascii
MEMORY=$DATADIR/DL1memory
echo stty -F $DLDEVICE $PORTSETTINGS | /bin/logger -i -t "DL1logger $0" 2>&1
stty -F $DLDEVICE $PORTSETTINGS | /bin/logger -i -t "DL1logger $0" 2>&1
stty -F $DLDEVICE -a | /bin/logger -i -t "DL1logger $0" 2>&1
echo stty -F $DLDEVICE $PORTSETTINGS | /bin/logger -i -t "DL1logger" 2>&1
stty -F $DLDEVICE $PORTSETTINGS | /bin/logger -i -t "DL1logger" 2>&1
stty -F $DLDEVICE -a | /bin/logger -i -t "DL1logger" 2>&1
$LOGGERBINARY -port $DLDEVICE -memory $MEMORY \
-datapath $DATAPATH -activepath $ACTIVEPATH \
......
......@@ -28,8 +28,9 @@
#
# ============================================================================
#
echo "check status of time sources" | /bin/logger -i -p user.notice -t "DL1logger $0" 2>&1
/usr/bin/chronyc sources | /bin/logger -i -p user.notice -t "DL1logger $0" 2>&1
/usr/bin/chronyc sourcestats | /bin/logger -i -p user.notice -t "DL1logger $0" 2>&1
echo "$0" | /bin/logger -i -p user.notice -t "DL1logger" 2>&1
echo "check status of time sources" | /bin/logger -i -p user.notice -t "DL1logger" 2>&1
/usr/bin/chronyc sources | /bin/logger -i -p user.notice -t "DL1logger" 2>&1
/usr/bin/chronyc sourcestats | /bin/logger -i -p user.notice -t "DL1logger" 2>&1
# ----- END OF chronyreport.sh -----
......@@ -26,11 +26,12 @@
# 19/12/2008 V1.0 Thomas Forbriger
#
# ============================================================================
echo "check logger" | /bin/logger -i -p user.info -t "DL1logger $0" 2>&1
echo "$0" | /bin/logger -i -t "DL1logger" 2>&1
echo "check logger" | /bin/logger -i -p user.info -t "DL1logger" 2>&1
SCRIPTDIR=$HOME/bin/scripts
LOGGERSCRIPT=$SCRIPTDIR/DL1logger.sh
LOGDIR=$HOME/DL1/log
mkdir -pv $LOGDIR | /bin/logger -i -p user.info -t "DL1logger $0" 2>&1
mkdir -pv $LOGDIR | /bin/logger -i -p user.info -t "DL1logger" 2>&1
LOGFILE=$LOGDIR/$(date +'%Y%m%d.%H%M').log
/sbin/checkproc $LOGGERSCRIPT
......@@ -38,7 +39,7 @@ status=$?
if test $status != 0
then
echo "/usr/bin/nohup $LOGGERSCRIPT 2>&1 >> $LOGFILE &" \
| /bin/logger -i -p user.notice -t "DL1logger $0" 2>&1
| /bin/logger -i -p user.notice -t "DL1logger" 2>&1
/usr/bin/nohup $LOGGERSCRIPT >> $LOGFILE 2>&1 &
fi
......
......@@ -27,6 +27,7 @@
#
# ============================================================================
#
echo "check status of NTP peers" | /bin/logger -i -p user.notice -t "DL1logger $0" 2>&1
/usr/sbin/ntpq -p | /bin/logger -i -p user.notice -t "DL1logger $0" 2>&1
echo "$0" | /bin/logger -i -t "DL1logger" 2>&1
echo "check status of NTP peers" | /bin/logger -i -p user.notice -t "DL1logger" 2>&1
/usr/sbin/ntpq -p | /bin/logger -i -p user.notice -t "DL1logger" 2>&1
# ----- END OF ntpreport.sh -----
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment