Operating System - HP-UX
1848028 Members
3099 Online
104022 Solutions
New Discussion

Model scripts for printers

 
Martin Bourgie
Occasional Contributor

Model scripts for printers

When you create a printer you get a model script uner /etc/lp/interface/model.orig. When I send a job to a printer I get the following message in /var/adm/lp/log
-> "/etc/lp/interface/model.orig/c10w2h9[4886]: /caro.out: Cannot create the specified file."

now c10w2h10 is the printname and it's trying to write to a file in slash. When I view the script this is when it's being called.
-> "# ********** Start sending bytes out ****************
echo"start sending bytes">>/caro.out
"

I wandering what it's being used for and how to correct this problem???

cheers,
4 REPLIES 4
Frank Slootweg
Honored Contributor

Re: Model scripts for printers

This looks like a non-standard model/interface script.

Which model script (i.e. name) did you install?

Where did you get that model script from?

Does "caro" mean anything to you? (It does not to me.)

In any case, post the first 20 or so lines of the interface script (/etc/lp/interface/model.orig/c10w2h9) or attach the complete script.
Armin Feller
Honored Contributor

Re: Model scripts for printers

Hi,

check permissions of /var/adm/lp/log.

# ll /var/adm/lp/log
-rw-r--r-- 1 lp lp 33 Nov 19 19:15 /var/adm/lp/log

Regards ...
Armin
Martin Bourgie
Occasional Contributor

Re: Model scripts for printers

I did use the latest hppi program to add all the printers and the permissions on the node are ok. It's typical that only certain printers will always have the same error. It's very bizarre.

Keep the suggestions coming, I'm still trying to figure it out.

cheers,
martin
Chris Wilshaw
Honored Contributor

Re: Model scripts for printers

The problem is that the scheduler runs as lp, and as such, it's unable to write to the root directory.

To me, it looks like a message that someone added in order to debug the interface script while it was being developed, but which is probably not needed now.

The solution is either to change the model script to put the log elsewhere if you want to keep it (/var/tmp or /tmp would be best), or to just comment the line

echo"start sending bytes">>/caro.out

out of the script.

If you decide to keep the log file, you would probably want it to be more informative than just "start sending bytes" anyway. I'd suggest that it was changed to

echo "`date`: start sending bytes"

so that you know how often it's being used. Another consideration is housekeeping. The last thing you want to do is to fix one problem, and create another by filling up /var or /tmp.