-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lpadmin silently ignores -o when creating .ppd #4578
Comments
CUPS.org User: mike Fixed in Subversion repository. |
"str4578.patch": Index: cups/testppd.c--- cups/testppd.c (revision 12597)
Index: systemv/lpadmin.c--- systemv/lpadmin.c (revision 12597)
ppdMarkDefaults(ppd); @@ -1398,6 +1428,8 @@
@@ -1409,13 +1441,13 @@
- ppdchanged = 0;
@@ -1537,6 +1569,9 @@
/*
Requests loggedcount= FAIL: $count requests logged, expected $expected. " >>$strfile |
Version: 2.0-current
CUPS.org User: yg344
It appears that when using lpadmin to generate a .ppd that was not there before with -m, options provided with -o are not applied. When using lpadmin to modify a preexisting .ppd, options provided with -o are applied.
There is no output to indicate that this is what is occurring, and nothing in the manpage for lpadmin that would clue users in.
We noticed this on an hour-long bughunt through our mass-deployed printer setup scripts to identify what was causing a printer to default to using the wrong paper size. We would run the script (which first removed all the .ppds), observe that the generated .ppd was wrong, then run the same lpadmin command on the command line (which was now modifying the .ppd created by the earlier run in the script), then observe that the generated .ppd was now correct.
For reference, the command used was:
/usr/sbin/lpadmin -p [name] -E -m MCS/[name].ppd -D "[description]" -L "[location]" -v "[address]" -o PageSize=Letter -o HPOption_Duplexer=True -o printer-is-shared=true -u allow:root,remroot
Where MCS/[name].ppd had the correct PageSize setting, different from the .ppd generated in /etc/cups/ppd/ by the above command. Running the same command again corrected the file.
The text was updated successfully, but these errors were encountered: