From ili@degennes.pc.tu-clausthal.de  Mon Mar 11 02:26:51 2002
Return-Path: <ili@degennes.pc.tu-clausthal.de>
Received: from degennes.pc.tu-clausthal.de (degennes.pc.tu-clausthal.de [139.174.150.42])
	by hub.freebsd.org (Postfix) with ESMTP id 5B33F37B402
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Mar 2002 02:26:50 -0800 (PST)
Received: (from root@localhost)
	by degennes.pc.tu-clausthal.de (8.11.6/8.11.6) id g2BAQXN05804;
	Mon, 11 Mar 2002 11:26:33 +0100 (CET)
	(envelope-from ili)
Message-Id: <200203111026.g2BAQXN05804@degennes.pc.tu-clausthal.de>
Date: Mon, 11 Mar 2002 11:26:33 +0100 (CET)
From: Ilshat Gubaidullin <gubaidullin@pc.tu-clausthal.de>
Reply-To: Ilshat Gubaidullin <gubaidullin@pc.tu-clausthal.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Why there is no /usr/local/bin in PATH variable in /etc/rc? 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35770
>Category:       misc
>Synopsis:       Why there is no /usr/local/bin in PATH variable in /etc/rc?
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    cjc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 11 02:30:01 PST 2002
>Closed-Date:    Wed Jul 24 21:34:45 PDT 2002
>Last-Modified:  Wed Jul 24 21:34:45 PDT 2002
>Originator:     Ilshat Gubaidullin
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
>Environment:
System: Platform i386, hardware independent, all releases since FreeBSD-4.1.1-RELEASE, all Samba releases since 2.0.7, all LPRng releases since 3.7.3.
		
>Description:
LPRng-printing system install their lpr, lpc and other binaries in /usr/local/bin by default. 
 When Samba starts without /usr/local/bin in PATH env.variable and printing is set to lprng in Samba configurations file then Samba starts without error messages but printing from clients will fail with no error message to client and not very intelligible message in samba logfile: 
--------samba log by loglevel 6--------
[2002/03/11 11:19:42, 3] printing/print_generic.c:print_run_command(88)
  Running the command `lpr -s -r -PHP870Cxi smbprn.000121.YPtfMW' gave 127
[2002/03/11 11:19:42, 5] smbd/files.c:file_free(339)
  freed files structure 4673 (0 used)
[2002/03/11 11:19:42, 4] smbd/dosmode.c:set_filetime(331)
  set_filetime(/var/spool/samba/smbprn.000121.YPtfMW) failed: No such file or di
rectory
--------end of samba log ---------------

>How-To-Repeat:
Move lpr and lpc from /usr/bin to /usr/local/bin and try to get samba printing after reboot... 

>Fix:
add /usr/local/bin in PATH variable in /etc/rc. Why /usr/local/sbin is added and /usr/local/bin is not?
There are many other ways to fix it, but for newbies is extremely difficult to find it out and it is possible that other scripts in /usr/local/etc/rc.d will wokr incorrectly without /usr/local/bin in PATH variable... 
>Release-Note:
>Audit-Trail:

From: "Crist J. Clark" <cjc@FreeBSD.ORG>
To: Ilshat Gubaidullin <gubaidullin@pc.tu-clausthal.de>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: misc/35770: Why there is no /usr/local/bin in PATH variable in /etc/rc?
Date: Mon, 11 Mar 2002 03:20:22 -0800

 On Mon, Mar 11, 2002 at 11:26:33AM +0100, Ilshat Gubaidullin wrote:
 [snip]
 
 > Why /usr/local/sbin is added and /usr/local/bin is not?
 
 You're right. /usr/local/sbin should not be there. It was added in
 revision 1.107 in 1996. The log indicates that it was added for
 "things like GateD." It looks like it was added to support some broken
 configuration options present in the rc-scripts at the time. It should
 be removed.
 
 For something like Samba, its rc script should contain the environment
 it needs to start properly. /etc/rc cannot not be expected to properly
 setup the environment for arbitrary third-party software.
 -- 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org
State-Changed-From-To: open->patched 
State-Changed-By: johan 
State-Changed-When: Mon Jul 22 13:42:01 PDT 2002 
State-Changed-Why:  
Crist removed /usr/local/sbin from the path in current. 

MFC reminder. 


Responsible-Changed-From-To: freebsd-bugs->cjc 
Responsible-Changed-By: johan 
Responsible-Changed-When: Mon Jul 22 13:42:01 PDT 2002 
Responsible-Changed-Why:  
Crist removed /usr/local/sbin from the path in current. 

MFC reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35770 
State-Changed-From-To: patched->closed 
State-Changed-By: cjc 
State-Changed-When: Wed Jul 24 21:33:30 PDT 2002 
State-Changed-Why:  
This was alread MFC'ed in a sweep by dougb in revision 1.212.2.48. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35770 
>Unformatted:
