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:
parent
ab1f140d3b
commit
4a28157d1c
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 &
|
||||
|
|
Loading…
Reference in New Issue