From owner-freebsd-questions@FreeBSD.ORG Wed May 13 09:33:26 2009 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 2D05A1065672 for ; Wed, 13 May 2009 09:33:26 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id D84BE8FC18 for ; Wed, 13 May 2009 09:33:25 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1M4Aq4-0006s4-89 for freebsd-questions@freebsd.org; Wed, 13 May 2009 09:33:24 +0000 Received: from pool-70-21-9-254.res.east.verizon.net ([70.21.9.254]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 May 2009 09:33:24 +0000 Received: from nightrecon by pool-70-21-9-254.res.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 May 2009 09:33:24 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Michael Powell Followup-To: gmane.os.freebsd.questions Date: Wed, 13 May 2009 05:34:43 -0400 Lines: 32 Message-ID: References: <20090513082716.GB1363@joni.subvert.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-70-21-9-254.res.east.verizon.net User-Agent: KNode/0.99.01 Sender: news Subject: Re: How to move vi to /bin X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: nightrecon@verizon.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2009 09:33:26 -0000 Chris Rees wrote: >> On Wed, May 13, 2009 at 12:51:46PM +0530, manish jain wrote: >>> I want to move vi to /bin so that I have an editor available in >>> single-user mode. This sounds simple (and should be if all you have is >>> a single partition), but there are problems. For starters, terminfo >>> can't locate its database in single-user mode. >>> >>> Could anyone please tell me how to go about this on a 7.x system ? I >>> am also curious to know why FreeBSD doesn't place vi under /bin in the >>> first place. > > You may also have a problem, because IIRC /usr/bin/vi is dynamically > linked with stuff in /usr/lib. Try it, it may work. It's probably why > it's in /usr/bin. > > Or just use /rescue/vi as Andrew suggested! > Yes - use the /rescue/vi as it has been statically compiled so it does not rely on dynamic libraries which may not be available. The purpose here is have a fallback position for repairing a damage/problem which may prevent a successful mount of /usr. There really is nothing to be gained by cluttering up / with stuff that doesn't really belong there and can only bring problems later when you've forgotten what you've done. Kind of like how those coming over from a Linux environment all seem to want to change root's shell to bash, it serves no purpose except foot-shooting. -Mike