1847440 Members
2861 Online
110265 Solutions
New Discussion

Re: Printer Disabled

 
Elizangela_1
Frequent Advisor

Printer Disabled

Hi,

How can I modify the lp script for enable it every time.

Every now it change status for disable, and when enable return to normal.

Can modified this script?

if [ ! -x /usr/sbin/rlp ]
then
disable -r"can't execute /usr/sbin/rlp filter" $printer
exit 1
fi
3 REPLIES 3
Keith Bevan_1
Trusted Contributor

Re: Printer Disabled

Elizangela,

Please see the attached forum posting :-

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=299627

This posting has a number of useful suggestions, including one I posted myself.

Keith
You are either part of the solution or part of the problem
Steve Steel
Honored Contributor

Re: Printer Disabled

Hi

It disables for a reason.Try to solve that .

Otherwise make a cron script which runs every few minutes or seconds and
enables disabled printers.

Here is a script to enable all printers

#!/bin/ksh
#
#Printer parameter
#
# parameter is enable disable accept or reject to do all printers
#
option=$1
xx=`lpstat -p|grep printer|cut -f2 -d" "`
for printer in $xx
do
case $option in
accept) accept $printer ;;
reject) reject $printer ;;
enable) enable $printer ;;
disable) disable $printer ;;
*)echo invalid parameter ;;
esac
done


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Elizangela_1
Frequent Advisor

Re: Printer Disabled

Hi,

This script enable printers of a printer server too?


[HPUX-K460]telnet 192.1.2.11 (printer ip)
Trying...
Connected to 192.1.2.11.
Escape character is '^]'.

Local flow control off


*****************************
* Welcome to Print Server *
* Telnet Console *
*****************************

Server Name : PS-01186C
Server Model : Pocket Size Print Server
F/W Version : 2.00
MAC Address : 00 03 1B 01 18 6C
Uptime : 0 days, 21:26:23

Please Enter Password:

[Main Menu]
1 - Server Configuration
2 - Port Configuration
3 - TCP/IP Configuration
4 - AppleTalk Configuration
5 - Display Information
6 - Tools
7 - Save Configuration
0 - Quit