after upgrade, can't restart apache via cron

Mateusz Guzik mjguzik at gmail.com
Mon Nov 26 18:22:26 UTC 2012


On Fri, Nov 23, 2012 at 11:37:54PM +0900, Hiroki Sato wrote:
> "Michael W. Lucas" <mwlucas at michaelwlucas.com> wrote
>   in <20121123031753.GA59632 at bewilderbeast.blackhelicopters.org>:
> 
> mw> eval: setfib: not found
> mw> /usr/local/etc/rc.d/apache22: WARNING: failed to start apache22
> mw>
> mw> If I run /usr/local/etc/rc.d/apache22 restart from the command line, I
> mw> can restart httpd without trouble.
> mw>
> mw> Any thoughts?
> 
>  This was due to $PATH in the cron job as already pointed out, but
>  this should not happen.  I attached a patch to use full-path for
>  external commands in rc.subr.  If there is no objection to this
>  change I will commit it.
> 

service(8) tries to sanitize stuff before executing scripts. How about
making this the default behaviour?

Currently stuff like PATH "leak" to rc scripts and this can be harmful
(for instance daemon was happily executing stuff from /usr/local/bin,
yet after reboot it stopped working).

Also I doubt anyone relies on current environment and what not to start
a service, but we can provide another target tha would start the service
without sanitizing in case this is needed.

-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the freebsd-current mailing list