From owner-freebsd-questions@FreeBSD.ORG Thu Apr 10 22:35:08 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF5E3106566B for ; Thu, 10 Apr 2008 22:35:08 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id BE23F8FC25 for ; Thu, 10 Apr 2008 22:35:08 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id C0D0B1CC91; Thu, 10 Apr 2008 14:35:05 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org Date: Fri, 11 Apr 2008 00:35:03 +0200 User-Agent: KMail/1.9.7 References: <1207855812.11735.39.camel@localhost> <200804102309.37024.fbsd.questions@rachie.is-a-geek.net> <1207863879.11735.85.camel@localhost> In-Reply-To: <1207863879.11735.85.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804110035.04406.fbsd.questions@rachie.is-a-geek.net> Cc: Edward Capriolo , Shelby Cain Subject: Re: Invoking ldconfig without arguments wipes all hints and makes me very sad X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2008 22:35:09 -0000 On Thursday 10 April 2008 23:44:39 Shelby Cain wrote: > On Thu, 2008-04-10 at 23:09 +0200, Mel wrote: > > First of all, running ldconfig without arguments does nothing bad. > > Running ldconfig without flags and with arguments does. > > > > Secondly, what is the command: > > ldconfig /usr/lib > > > > supposed to do, according to newbie friendly logic? > > Because it should be possible to "just have the linker create hints for > > one directory". > > Your example seems perfectly reasonable should one wish to create hints > for only one directory. > > However, in my particular case it seems that my blunder of running > ldconfig -v (and not ldconfig by itself as I had assumed - my bad) is > sufficient to render it impossible to log in as my regular user account > since I had set my default login shell to bash. That, in conjunction > with root being disallowed by default in sshd effectively locked me out > of my machine once I closed my only open ssh session. > > Modifying my original suggestion slightly, is there any reason why it > would be a bad thing for ldconfig to assume -r when either -v with no > other arguments (or no arguments at all) is passed to ldconfig or is > there some specific reason for the current behavior? It translates to "be verbose about restoring factory settings", because without arguments it will restore the built-in set. The 'alias' shell command is suitable for user protection: alias ldconfig='/sbin/ldconfig -r' This will default to -r if called as ldconfig. If you really do want to modify the search path on the command line, you can type the full path to the ldconfig binary, as in: /sbin/ldconfig -vm /usr/local/lib. Similar: alias rm='rm -i' alias cp='cp -i' -- Mel Problem with today's modular software: they start with the modules and never get to the software part.