Bug 520599

Summary: CUPS 1.4: yast2-printer: 'lpstat -r' results true even when cupsd is not running
Product: [openSUSE] openSUSE 11.2 Reporter: Johannes Meixner <jsmeix>
Component: PrintingAssignee: Johannes Meixner <jsmeix>
Status: RESOLVED FIXED QA Contact: Johannes Meixner <jsmeix>
Severity: Normal    
Priority: P3 - Medium    
Version: Factory   
Target Milestone: Milestone 5   
Hardware: All   
OS: SUSE Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Johannes Meixner 2009-07-09 12:03:23 UTC
Currently I run CUPS 1.4 RC1 for testing it
on my openSUSE 11.1 i386 workstation.

'lpstat -r' results true even when scheduler is not running.

Therefore in yast2-printer the 'lpstat -r' tests in
/usr/lib/YaST2/bin/autodetect_print_queues
/usr/lib/YaST2/bin/autodetect_printers
/usr/lib/YaST2/bin/create_printer_ppd_database
/usr/lib/YaST2/bin/determine_printer_driver_options
do no longer work and must be replaced with

if $LPSTAT -h $SERVERNAME -r | grep -q 'scheduler is not running'
then echo "Cannot access cupsd on '$SERVERNAME'" 1>&2
     exit 2
fi
Comment 1 Johannes Meixner 2009-07-09 12:09:49 UTC
Must also be fixed in src/Printerlib.ycp:

string local_cupsd_accessible_commandline = "/usr/bin/lpstat -h localhost -r";

must be replaced with

... "/usr/bin/lpstat -h localhost -r | grep -q 'scheduler is running'"
Comment 2 Johannes Meixner 2009-07-09 12:21:15 UTC
Fixed in yast2-printer in SVN committed revision 57977.
But not yet checked in as package for Factory.
Comment 3 Johannes Meixner 2009-07-28 12:23:13 UTC
Submitted as yast2-printer 2.18.18 to openSUSE:Factory:

 15643  State:new     Creator:jsmeix       When:2009-07-28T13:11:36
        submit:       YaST:Head/yast2-printer  ->  openSUSE:Factory       
        Comment: 'Upgraded to 2.18.18'