HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Auto re-enable printer
Operating System - HP-UX
1834140
Members
2841
Online
110064
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2000 06:49 AM
11-20-2000 06:49 AM
On HP-UX 11, I have users who occasionally accidentally send a huge output job to an HP LaserJet printer, attached to the network with an HP JetDirect EX Plus print server. If no operator is around, the user will cut off the printer to stop the output, and later they turn it back on. The print job is gone, but the printer is no longer enabled on HP-UX and requires a command to re-enable the printer. Is there a way that printers can auto re-enable themselves without using a cron job do it? TIA.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2000 07:02 AM
11-20-2000 07:02 AM
Solution
You can use a simple script that runs in background like this:
***************************************
#! /bin/ksh
xx=0
while [ $xx -eq 0 ]
do
lpstat -p| grep disabled| awk '{fnd = 0} /^[A-Za-z] {fnd = 1
var = $0
print $0
next}
{ if (fnd != 1 )
{print var ""$0}
}'| awk '{print $2}'| xargs enable
sleep 600
done
******************************************
This script will run in background and check every 600 seconds the disabled printers enabling them
Regards,
Federico
***************************************
#! /bin/ksh
xx=0
while [ $xx -eq 0 ]
do
lpstat -p| grep disabled| awk '{fnd = 0} /^[A-Za-z] {fnd = 1
var = $0
print $0
next}
{ if (fnd != 1 )
{print var ""$0}
}'| awk '{print $2}'| xargs enable
sleep 600
done
******************************************
This script will run in background and check every 600 seconds the disabled printers enabling them
Regards,
Federico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2000 07:07 AM
11-20-2000 07:07 AM
Re: Auto re-enable printer
You could just remove the 'disable' command from your printer interface script and maybe replace it with some other command that could do some things for you. /etc/lp/interface/
In a world without fences - who needs Gates ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2000 07:07 AM
11-20-2000 07:07 AM
Re: Auto re-enable printer
if you have configured your printer as a remote printer (not with jetadmin) you could go to /var/spool/lp/interface
and edit the printer interface script (same name as the printer queue) and comment the disable command at the near end of the script
#disable -r"$reason" $printer
and edit the printer interface script (same name as the printer queue) and comment the disable command at the near end of the script
#disable -r"$reason" $printer
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP