From owner-freebsd-questions@FreeBSD.ORG Wed Apr 8 16:35:07 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B0334BB for ; Wed, 8 Apr 2015 16:35:07 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1967C324 for ; Wed, 8 Apr 2015 16:35:06 +0000 (UTC) Received: from r56.edvax.de (port-92-195-131-196.dynamic.qsc.de [92.195.131.196]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 5BCDF3CD71 for ; Wed, 8 Apr 2015 18:34:58 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t38GYvpa002083 for ; Wed, 8 Apr 2015 18:34:57 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 8 Apr 2015 18:34:57 +0200 From: Polytropon To: FreeBSD FreeBSD Subject: Re: Path settings Message-Id: <20150408183457.0f928632.freebsd@edvax.de> In-Reply-To: <20150408080410.437e58a9@seibercom.net> References: <20150408080410.437e58a9@seibercom.net> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 16:35:07 -0000 On Wed, 8 Apr 2015 08:04:10 -0400, Jerry wrote: > I have never understood which comes first in the path setting; "/usr/bin" > or "/usr/local/bin". The same can be said for "/usr/sbin" > and /usr/local/sbin". System-level tools usually have higher priority, and additionally installed software (which resides in /usr/local subtrees per default). Per-user installed software, as well as software not managed by ports or pgk, can be put into ~/bin or /opt/bin, but this typically requires additions to the configuration. > The reason I am asking is because I have "openssl" installed from ports. If I > have the former path setting and run "which openssl", the system openssl is > reported. However, if I switch the path setting to the latter, and rerun the > command, the port version of openssl is revealed. This behaviour is logical and intended. Just imagine someone would install a "ls 'replica'" which would do stupid or nasty things... ;-) The _first_ matching command found by looking at the $PATH entries will be executed. However, it's probably easier to get rid of the system's OpenSSL tools if you're not intending to use them. Keep in mind that certain scripts may redifine $PATH, so what you expect in a user's CLI session might not apply when you run scripts (or when the system runs them). > I have "WITH_OPENSSL_PORT=yes" in the "/etc/make.conf" file if that makes any > difference. You can define WITHOUT_OPENSSL and maybe WITHOUT_OPENSSH in /etc/src.conf to _not_ have them in the system, and you will have to supply them as ports. ALso check the ports options, it's possible that there's a configuration switch (in "make config") that allows the port to install files to the system-level directories (such as CUPS can do, to replace the system's lp* tools). See "man src.conf" for details. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...