From owner-freebsd-questions@FreeBSD.ORG Thu Apr 10 20:14:46 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 7B6C61065670 for ; Thu, 10 Apr 2008 20:14:46 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr11.xs4all.nl (smtp-vbr11.xs4all.nl [194.109.24.31]) by mx1.freebsd.org (Postfix) with ESMTP id D07AC8FC16 for ; Thu, 10 Apr 2008 20:14:45 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr11.xs4all.nl (8.13.8/8.13.8) with ESMTP id m3AKEdBZ075041; Thu, 10 Apr 2008 22:14:39 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 1B97AB82D; Thu, 10 Apr 2008 22:14:39 +0200 (CEST) Date: Thu, 10 Apr 2008 22:14:39 +0200 From: Roland Smith To: Shelby Cain Message-ID: <20080410201439.GA45576@slackbox.xs4all.nl> Mail-Followup-To: Shelby Cain , freebsd-questions@freebsd.org References: <1207855812.11735.39.camel@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline In-Reply-To: <1207855812.11735.39.camel@localhost> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org 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 20:14:46 -0000 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 10, 2008 at 02:30:12PM -0500, Shelby Cain wrote: > Greetings list. I'm a new user to FreeBSD and I just managed to > introduce myself to ldconfig's default behavior. I'm currently locked > out of my remote server since bash isn't statically compiled and will > have to get physical access to correct my blunder. :( It is unwise to use a port as a root shell. What if /usr or /usr/local is o= n a separate partition which isn't mounted in single user mode? Do you know that there are a lot of statically linked binaries available in /rescue just for this eventuality? And that there are two shells amongst them; (t)csh and sh? =20 > As a new user to FreeBSD, ldconfig's default behavior makes about as > much sense to me as rm adding "-fr ~" or kill adding "-9 1" in the > absence of arguments. I hate to sound ignorant but I have to ask, is > there any particular reason FreeBSD's ldconfig defaults to this > seemingly unintuitive and non-newbie-safe behavior? >=20 > Would a patch that changes the behavior of ldconfig to assume -r in the > absence of command line arguments and adds a new parameter like > -e[rase]|-d[estroy]|-w[ipe]|-z[ap]|-l[olnewbie] to enable the original > behavior be likely to gain any acceptance? Can you specify what exactly you mean? Calling ldconfig without arguments doesn't do anything to the hints file: slackbox# ll /var/run/ld-elf.so.hints -r--r--r-- 1 root wheel 287 Apr 8 19:40 /var/run/ld-elf.so.hints slackbox# cp /var/run/ld-elf.so.hints /var/run/ld-elf.so.hints.orig slackbox# ldconfig slackbox# ll /var/run/ld-elf.so.hints -r--r--r-- 1 root wheel 287 Apr 10 22:03 /var/run/ld-elf.so.hints slackbox# diff -u /var/run/ld-elf.so.hints.orig /var/run/ld-elf.so.hints slackbox#=20 So there was no change to the file. Did you perchance delete the hints file, or unmounted the filesystem where /var is located? Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkf+dS8ACgkQEnfvsMMhpyVvmACeNmunkmeRtqOEs/Xa3qLJvJZe sEYAn1x1vp7ST3dygQVvj38V1GLCZoJj =T8RQ -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c--