Bug 205604 - add filter-path capability to printcap
Summary: add filter-path capability to printcap
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Eugene Grosbein
Keywords: easy, feature, needs-qa, patch
Depends on:
Reported: 2015-12-25 19:03 UTC by Bertram Scharpf
Modified: 2017-11-05 19:35 UTC (History)
2 users (show)

See Also:
eugen: mfc-stable11-
eugen: mfc-stable10-

The whole patch as an output from git-show (4.01 KB, patch)
2015-12-25 19:03 UTC, Bertram Scharpf
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertram Scharpf 2015-12-25 19:03:22 UTC
Created attachment 164640 [details]
The whole patch as an output from git-show

In my /etc/printcap the :if: capability points to a Ruby script.
This script contains the shebang line

  #!/usr/bin/env ruby

After boot the printer daemon lpd has got its environment variable
PATH from /etc/rc. This PATH does not include /usr/local/bin.
Therefore the Ruby executable will not be found and the print
commands fails.

I extended the printcap mechanism by a filter-path capability that
allows to set the PATH variable before exec()ing into the filter.
Comment 1 Bertram Scharpf 2016-05-31 12:56:39 UTC
Comment 2 Bertram Scharpf 2016-08-01 09:25:31 UTC
Comment 3 Bertram Scharpf 2016-09-11 10:19:47 UTC
Comment 4 Bertram Scharpf 2017-04-14 11:17:45 UTC
Comment 5 Bertram Scharpf 2017-09-22 14:16:23 UTC
No answer for almost two years! What the hell is going on here?

I just installed 11.1 and I noticed that there is no solution for this problem since 10.2.

Why doesn't anybody at least reject the report?
Comment 6 Eugene Grosbein freebsd_committer 2017-09-23 06:47:27 UTC
The patch is not needed. Just add this to your /etc/rc.conf and restart lpd (service lpd restart), this works.

Comment 7 Bertram Scharpf 2017-11-04 18:17:59 UTC
(In reply to Eugene Grosbein from comment #6)

The lpd_env="PATH=..." workaround is not part of the ldp project an therefore
never will be mentioned in the man page. It fixes the behaviour but not the documentation problem.
Comment 8 Eugene Grosbein freebsd_committer 2017-11-05 19:35:24 UTC
(In reply to software from comment #7)

printcap(5) manual page could be modified to add a paragraph to the FILTERS section with a note that filter inherit environment from lpd(8) that can be modified with rc.conf's lpd_env variable.

Please submit another documentation PR, if you like to.