summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwukong <wukong@longaeva>2026-05-23 22:23:40 -0700
committerwukong <wukong@longaeva>2026-05-23 22:23:40 -0700
commitf023f3cd1099d238ad54d76538ac40d6efb02cce (patch)
tree2cb6b3d11760980f679a791530be369ae63d90dd
parent1afd0eb13b84a642a620c721917df3df03767c5e (diff)
changed echo statements to printf;
changed legacy rrd paths to /tmp/rrd and script dir to ~/srcz;
-rw-r--r--cisco678polld.sh4
-rw-r--r--[-rwxr-xr-x]start-cisco678polld.sh12
2 files changed, 8 insertions, 8 deletions
diff --git a/cisco678polld.sh b/cisco678polld.sh
index b017601..180e016 100644
--- a/cisco678polld.sh
+++ b/cisco678polld.sh
@@ -53,7 +53,7 @@ ckmkdb() {
fi
if [ ! -f ${DBDIR}/${PPPDBFILE} ] ; then
- echo ${DBDIR}/${PPPDBFILE} does not exist!
+ printf "${DBDIR}/${PPPDBFILE} does not exist!\n"
RRDARGZ=("")
RRDARGZ=(
"${RRDARGZ[@]:0}" \
@@ -192,7 +192,7 @@ main() {
## file names
LOCKFILE="/tmp/rrd/${SCRIPTNAME}.lock"
LOGFILE="/tmp/rrd/${SCRIPTNAME}.log"
- DBDIR="/tmp/rrd"
+ DBDIR="/tmp/rrd/db"
GRAPHDIR="/tmp/rrd/cisco678"
RRDSTEP=15
WAIT=5
diff --git a/start-cisco678polld.sh b/start-cisco678polld.sh
index fb82ef0..c26ced4 100755..100644
--- a/start-cisco678polld.sh
+++ b/start-cisco678polld.sh
@@ -9,7 +9,7 @@
#set -x
DAEMON=cisco678polld.sh
-DPATH=~/mon_rrd
+DPATH=~/srcz/mon_rrd
DLOCK=/var/tmp/${DAEMON}.lock
@@ -19,10 +19,10 @@ cklock() {
if [ -r ${1} ] ; then
DPID=$( cat ${1} )
else
- echo lock is not readable
+ printf "lock is not readable\n"
fi
else
- echo lock does not exist
+ printf "lock does not exist\n"
fi
}
@@ -35,10 +35,10 @@ cklockpid() {
grep -v 'grep' |\
awk '{print $1}' )
if [ ${CKPID} ] && [ ${1} -eq ${CKPID} ] ; then
- echo proc is running, lock is valid
+ printf "proc is running, lock is valid"
fi
else
- echo lock pid does not exist
+ pritf lock pid does not exist\n"
fi
}
@@ -108,7 +108,7 @@ case "${1}" in
start_daemon
;;
*)
- echo "Usage: $0 {start|stop|terminate|exterminate|restart}"
+ printf "Usage: $0 {start|stop|terminate|exterminate|restart}\n"
;;
esac