system/epson-printer-utility: Replaced backtick cmdsub

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Robby Workman 2024-07-14 18:25:07 -05:00 committed by Willy Sudiarto Raharjo
parent ab1f140d3b
commit 4a28157d1c
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
3 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ echo
echo "************************* NOTICE *********************************"
echo "ecbd needs to be running for the printer monitor to be usable. run"
echo "/etc/rc.d/rc.ecbd restart"
if [ x`grep "rc.ecbd start" /etc/rc.d/rc.local|wc -l` = "x0" ]; then
if [ x$(grep "rc.ecbd start" /etc/rc.d/rc.local|wc -l) = "x0" ]; then
echo "to get it to run automatically at startup, add the following"
echo "to /etc/rc.d/rc.local"
echo "if [ -x /etc/rc.d/rc.ecbd ]; then"

View File

@ -11,8 +11,8 @@
FNAME="README.models"
MAXLEN=${MAXLEN:-72}
#make sure MAXLEN is a integer bigger than 39
MAXLEN=`echo $MAXLEN|awk '($1<40) {print "40"} (int($1)>39) {print int($1) }'`
if [ -e $FNAME ]&&[ `cat $FNAME|head -n1|awk '{print length($0)}'` -gt $MAXLEN ]; then
MAXLEN=$(echo $MAXLEN|awk '($1<40) {print "40"} (int($1)>39) {print int($1) }')
if [ -e $FNAME ]&&[ $(cat $FNAME|head -n1|awk '{print length($0)}') -gt $MAXLEN ]; then
#only do something if the file exists, and thefirst line is longer than it
#should be.
TMPFILE=rmtmp

View File

@ -9,7 +9,7 @@ PIDFILE=/var/run/ecbd.pid
OPT=${1:-start}
case "$OPT" in
'start')
if [ `ps -A|grep ecbd|grep -v "rc.ecbd"|wc -l` -gt 0 ]||[ -e $PIDFILE ]; then
if [ $(ps -A|grep ecbd|grep -v "rc.ecbd"|wc -l) -gt 0 ]||[ -e $PIDFILE ]; then
echo "ecbd is already running"
else
/usr/lib/epson-backend/ecbd -p $PIDFILE &
@ -17,13 +17,13 @@ case "$OPT" in
;;
'stop')
if [ -e /var/run/ecbd.pid ]; then
kill `cat $PIDFILE`
kill $(cat $PIDFILE)
fi
rm -f $PIDFILE
;;
'restart')
if [ -e $PIDFILE ]; then
kill `cat $PIDFILE`
kill $(cat $PIDFILE)
fi
rm -f $PIDFILE
/usr/lib/epson-backend/ecbd -p $PIDFILE &