PATH variable in lpd's process

Anton Sayetsky vsasjason at gmail.com
Wed Dec 23 21:35:29 UTC 2015


23 дек. 2015 г. 23:34 пользователь "Bertram Scharpf" <
lists at bertram-scharpf.de> написал:
>
> Hi,
>
> On Monday, 21. Dec 2015, 17:43:38 +0100, Bertram Scharpf wrote:
> > in my "/etc/printcap", the "if" field points to an input
> > filter I wrote in Ruby. There, the first line is a shebang
> > saying
> >
> >   #!/usr/bin/env ruby
> >
> > Further there is
> >
> >   # procstat -e `pgrep lpd`
> >     PID COMM             ENVIRONMENT
> >     940 lpd              PATH=/sbin:/bin:/usr/sbin:/usr/bin PWD=/
HOME=/ RC_PID=20
> >
> > As you can easily see, I will receive a mail saying the
> > print job failed because of
> >
> >   env: ruby: No such file or directory
> >
> > When I restart "lpd" from the command line, the new process
> > receives the environment variables from the shell process
> > and everything ist fine.
> >
> > [...]
> >
> > "/etc/crontab" allows to reset the PATH variable but I do
> > not see a way to do the same in "/etc/printcap".
>
> I decided unhesitatingly to extend the lpd printcap
> mechanism and I added a filter-path variable that will be
> put into the filter processes before calling exec there.
>
> I think this should be part of the official FreeBSD release.
> Where is the right place to propose it?
http://bugs.FreeBSD.org


More information about the freebsd-questions mailing list