Operating System - HP-UX
1829133 Members
2325 Online
109986 Solutions
New Discussion

Re: Cancel prints on menu system

 
Nick D'Angelo
Super Advisor

Cancel prints on menu system

HP Admins,

I am creating a little menu so that I can delegate some of the mundane admin tasks such as cancelling print requests. I would like this done as non root, so I will put the users in the lp group and chmod 775 the /var/spool/lp/requests/* directories.

My only problem is: I would like the menu item to read in the 1, 2, 3 format, with item 2 being, List print jobs and prompt for the print job to cancel by having my admin support staff entering in cancel lp-1459 or quit to return to the menu.

Any ideas on how to get this done?

Thanks,
Always learning
9 REPLIES 9
John Poff
Honored Contributor

Re: Cancel prints on menu system

Hello,

Here are links to a couple of forum threads about menu scripting. One of the threads has some sample code in attachments. It looks like a good place to start. You can probably modify the menu to handle a choice for cancelling jobs:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x3beff9beca68d511abcd0090277a778c,00.html

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xc1bc79bffde7d4118fef0090279cd0f9,00.html


JP



Jordan Bean
Honored Contributor

Re: Cancel prints on menu system

Perhaps the attached snippet will help.
Nick D'Angelo
Super Advisor

Re: Cancel prints on menu system

My apologies for not posting the snippets required for your assistance.

Here is my menu script.
Always learning
Nick D'Angelo
Super Advisor

Re: Cancel prints on menu system

Jordan,

Thanks for your script/snip. I will review and advise, sorry I missed it earlier,

Nickd
Always learning
Nick D'Angelo
Super Advisor

Re: Cancel prints on menu system

Jordan,

Your script is quite good, but the quit does not work and you can not break out of it unless I press Ctrl C.

Was there more to the script, I am assuming.

Nickd
Always learning
Jordan Bean
Honored Contributor

Re: Cancel prints on menu system

Select requires numerical input. Anything else is ignored and the list displayed again. The only way to exit the select loop is to enter 1, since quit is listed first. I threw together this snippet to provide an example; It didn't actually come from anything I'm using.
Fred Martin_1
Valued Contributor

Re: Cancel prints on menu system

Here's a script that uses lpstat to list all printers with jobs in the queue(s), then lets you pick a job by name to cancel. Not very pretty, but works OK.
fmartin@applicatorssales.com
Nick D'Angelo
Super Advisor

Re: Cancel prints on menu system

Sorry, but I am still looking. None of these has worked so far.
Always learning
Deshpande Prashant
Honored Contributor

Re: Cancel prints on menu system

A thought..
Create a restricted SAM for the user/group with access to only printer-management [Printers-plotters->LP splloer -> Print requests.

Thanks
Prashant.
Take it as it comes.