Bug 199749 - sys-apps/baselayout-2.0.0_rc6: start-stop-daemon messes up $PATH
Bug#: 199749 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: blocker Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: dev-zero@gentoo.org
Component: baselayout
URL: 
Summary: sys-apps/baselayout-2.0.0_rc6: start-stop-daemon messes up $PATH
Keywords:  
Status Whiteboard: 
Opened: 2007-11-20 09:57 0000
Description:   Opened: 2007-11-20 09:57 0000
When starting the vpnc-client using the init.d-script, it spits out the
following:

 * Starting VPNC: uzh ...
/etc/vpnc/vpnc-script: line 70: which: command not found
/etc/vpnc/vpnc-script: line 70: which: command not found

It seems to work nevertheless.

------- Comment #1 From Christian Faulhammer 2007-11-20 11:55:54 0000 -------
You have a profile where which is not part of system?  It is a workaround for
SunOS (Solaris?) mainly, so the failing command has no effect on Linux/BSDs.

------- Comment #2 From Christian Faulhammer 2007-12-14 04:58:56 0000 -------
Resolving for the time being.

------- Comment #3 From Tiziano Müller 2007-12-14 07:21:53 0000 -------
Well, whether it has an effect or not, it's annoying.
My profile: default-linux/amd64/2007.0

------- Comment #4 From Christian Faulhammer 2007-12-14 07:44:50 0000 -------
(In reply to comment #3)
> Well, whether it has an effect or not, it's annoying.
> My profile: default-linux/amd64/2007.0

 Mhhh, ok, but the which command is available?  Please try to insert a random
which in vpnc-script and watch if it also fails...

------- Comment #5 From Tiziano Müller 2007-12-14 16:22:41 0000 -------
This results in various problems in init.d-scripts or services.
In my case, PATH looked like this:
/sbin:/usr/sbin:/bin:/sbin:/usr/bin�:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin

And the vpnc-script always moaned that "'which' could not be found". On another
machine my ccollect-based backup cron job stopped working since ccollect
couldn't find rsync because the scripts get the same environment as fcron does.

The patch at http://roy.marples.name/~roy/start-stop-daemon.patch solves the
issue (thanks to Roy)

------- Comment #6 From Benedikt Böhm 2007-12-14 16:47:31 0000 -------
please somebody fix this ASAP, it is a major annoyance to have a corrupted PATH
in env for every service started via init scripts

------- Comment #7 From Roy Marples (RETIRED) 2007-12-22 11:10:32 0000 -------
*** Bug 202977 has been marked as a duplicate of this bug. ***

------- Comment #8 From Benedikt Böhm 2007-12-28 11:09:24 0000 -------
since no base-system member was able to fix that in a timely manner i have
commited 2.0.0_rc6-r1 with roys patch now...