Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 May 2009 05:34:43 -0400
From:      Michael Powell <nightrecon@verizon.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: How to move vi to /bin
Message-ID:  <gue44o$pqu$1@ger.gmane.org>
References:  <cb0fa7b70905130021t390bb560r4a1dd64ab3b2e79@mail.gmail.com> <20090513082716.GB1363@joni.subvert.org.uk> <b79ecaef0905130130o10d593cdm3fb60b6175112d67@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?gue44o$pqu$1>