From owner-freebsd-questions Sat Aug 28 13:29:33 1999 Delivered-To: freebsd-questions@freebsd.org Received: from terrapin.ru.ac.za (terrapin.ru.ac.za [146.231.128.6]) by hub.freebsd.org (Postfix) with ESMTP id E95DC14CFA for ; Sat, 28 Aug 1999 13:29:23 -0700 (PDT) (envelope-from nbm@mithrandr.moria.org) Received: from duca.dialup.ru.ac.za ([146.231.98.24] helo=mithrandr.moria.org) by terrapin.ru.ac.za with esmtp (Exim 3.03 #1) id 11Kp5v-000PbL-00 for freebsd-questions@FreeBSD.ORG; Sat, 28 Aug 1999 22:28:59 +0200 Received: (qmail 32185 invoked by uid 1001); 28 Aug 1999 18:22:26 -0000 Date: Sat, 28 Aug 1999 20:22:26 +0200 From: Neil Blakey-Milner To: Ben Smithurst Cc: big-sky@altavista.net, freebsd-questions@FreeBSD.ORG Subject: Re: roots shell Message-ID: <19990828202226.A31577@mithrandr.moria.org> References: <19990819222133.B12658@lithium.scientia.demon.co.uk> <000301bef156$a12cc5a0$0201010a@cmr.net> <19990828155720.D28779@lithium.scientia.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <19990828155720.D28779@lithium.scientia.demon.co.uk>; from Ben Smithurst on Sat, Aug 28, 1999 at 03:57:20PM +0100 Organization: Rhodes University Computer Users' Society X-Operating-System: FreeBSD 4.0-CURRENT i386 X-URL: http://rucus.ru.ac.za/~nbm/ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat 1999-08-28 (15:57), Ben Smithurst wrote: > Mark Einreinhof wrote: > > > "/usr/local/bin/bash --version >/dev/null 2>&1 && exec /usr/local/bin/bash" > > Sorry, my mistake: this should have the "--login" flag, i.e. > > /usr/local/bin/bash --version >/dev/null 2>&1 && \ > exec /usr/local/bin/bash --login Try this: ldd /usr/local/bin/bash && exec /usr/local/bin/bash --login (nbm@mithrandr) /usr/home/nbm> env LD_PRELOAD=foo ldd /usr/local/bin/bash /usr/libexec/ld-elf.so.1: Shared object "foo" not found (nbm@mithrandr) /usr/home/nbm> echo $? 1 (nbm@mithrandr) /usr/home/nbm> ldd /usr/local/bin/bash /usr/local/bin/bash: libtermcap.so.2 => /usr/lib/libtermcap.so.2 (0x280b4000) libc.so.3 => /usr/lib/libc.so.3 (0x280b9000) (nbm@mithrandr) /usr/home/nbm> echo $? 0 I don't know if that's "allowed", but it seems to work here. Neil -- Neil Blakey-Milner nbm@rucus.ru.ac.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message