Hi all,
A bug found on creating a printer entry using the lpadmin module. Please
notice the -sDEVICE=[device] is incorrect and result gs to complain.
Please correct this problem. Thanks.
The file content is from /etc/webmin/lpadmin/drivers/test (My printer
name is called test with the driver "ljet4" )
#!/bin/sh
# Name: test
# Type: HP LaserJet 1100 (ljet4)
# DPI: 300
LD_LIBRARY_PATH=
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
export LD_LIBRARY_PATH PATH GS_FONTPATH GS_LIB
/usr/bin/perl -e 'while(<STDIN>) { print if (!/^\s*#####/); }' >/tmp/$$.gsin
gs -sOutputFile=/tmp/$$.gs -dSAFER -sDEVICE= -r300 -dNOPAUSE
/tmp/$$.gsin </dev/null >/dev/null 2>&1
rm /tmp/$$.gsin
cat /tmp/$$.gs
rm /tmp/$$.gs
The correct version of the file should be following and I have tested to
be work.
#!/bin/sh
# Name: test
# Type: HP LaserJet 1100 (ljet4)
# DPI: 300
LD_LIBRARY_PATH=
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
export LD_LIBRARY_PATH PATH GS_FONTPATH GS_LIB
/usr/bin/perl -e 'while(<STDIN>) { print if (!/^\s*#####/); }' >/tmp/$$.gsin
gs -sOutputFile=/tmp/$$.gs -dSAFER -sDEVICE=ljet4 -r300 -dNOPAUSE
/tmp/$$.gsin </dev/null >/dev/null 2>&1
rm /tmp/$$.gsin
cat /tmp/$$.gs
rm /tmp/$$.gs
Just fill up the -sDEVICE=ljet4 or with the correct device driver name
and it will work correctly. This bug is reproducible through create a
printer entry under the lpadmin webmin module.
regards,
David
|