Bug 690812

Summary: Cups -t the syntax does not exit correctly when encountering a incorrect syntax.
Product: [Fedora] Fedora Reporter: Jóhann B. Guðmundsson <johannbg>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: jpopelka, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-25 14:16:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jóhann B. Guðmundsson 2011-03-25 13:16:56 UTC
Description of problem:

Decide to check if the syntax checker did not work correctly when I noticed this..

Unknown directive Test on line 1. <-- Unknow/incorrect syntax this is good 
/etc/cups/cupsd.conf is OK <-- WTF this is bad 

Kinda makes it useless to do anykind of pre checking in init scripts ( start/reload/restart ) if it always returns OK..

Version-Release number of selected component (if applicable):

cups-1.4.6-12.fc15.i686

How reproducible:

Always

Steps to Reproduce:
1. Add bogus entry or bogus syntax to already existing entry in cupsd.conf
2.
3.
  
Actual results:



Expected results:


Additional info:

Comment 1 Tim Waugh 2011-03-25 14:16:51 UTC
It's not fatal if it doesn't understand a keyword.  This could happen if, e.g. CUPS has been patched to understand some particular special keyword previously, but no longer is. (This has happened before in Fedora...)

It would be fatal if e.g. there is no configured port for listening on, or the "Policy" sections are not correctly closed with "</Policy>".

I think that '-t' is telling you whether CUPS will actually start up, and it would in the circumstance you describe.