Package: lprng
Version: 3.8.A~rc4-3
Severity: minor

Dear Craig,

acting on your advice, I submit the following as a new minor bug.

In the script /etc/init.d/lprng I would replace the line

LPD_PORT=$(grep "^[[:space:]]*lpd_port" $CONFIGDIR/lpd.conf | cut -d "=" -f 2)

by

LPD_PORT=$(sed '/^[[:space:]]*lpd_port/!d; s/.*[=#]\(.*\)/\1/; q' 
$CONFIGDIR/lpd.conf)

and, accordingly, the line

LOCKFILE=$(grep "^[[:space:]]*lockfile" $CONFIGDIR/lpd.conf | cut -d "=" -f 2)

by

LOCKFILE=$(sed '/^[[:space:]]*lockfile/!d; s/.*[=#]\(.*\)/\1/; q' 
$CONFIGDIR/lpd.conf)

This has three advantages:
1) The syntax as described in the manual page lpd.conf(5) is
   better satisfied, as it also allows lines like
      lpd_port#505
   similar to the syntax of printcap files.
2) In case there is more than one matching line only the first
   one is used and the result doesn't contain a newline.
3) There is no need to call two external programs (no dependency on grep 
anymore)
   and connect them with a pipe.

--
Regards,
Jörg-Volker.





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to