From owner-freebsd-questions@FreeBSD.ORG Fri May 15 15:45:13 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 013C7106564A for ; Fri, 15 May 2009 15:45:13 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id C15048FC18 for ; Fri, 15 May 2009 15:45:12 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from sarevok.dnr.servegame.org (mailhub.lan.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 413007E837; Fri, 15 May 2009 07:45:11 -0800 (AKDT) From: Mel Flynn To: freebsd-questions@freebsd.org Date: Fri, 15 May 2009 17:45:09 +0200 User-Agent: KMail/1.11.2 (FreeBSD/8.0-CURRENT; KDE/4.2.3; i386; ; ) References: <200905142019.56242.mel.flynn+fbsd.questions@mailing.thruhere.net> <4A0D0FD6.4040107@gmail.com> In-Reply-To: <4A0D0FD6.4040107@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905151745.09871.mel.flynn+fbsd.questions@mailing.thruhere.net> Cc: Manish Jain Subject: Re: How to move vi to /bin 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: Fri, 15 May 2009 15:45:13 -0000 On Friday 15 May 2009 08:46:46 Manish Jain wrote: > Mel Flynn wrote: > > On Wednesday 13 May 2009 09:21:46 manish jain wrote: > >> I want to move vi to /bin so that I have an editor available in > >> single-user mode. > > > > The only reason to need an editor and not have /usr and /var available is > > to edit /etc/fstab. It is trivial to spot errors with /rescue/cat and fix > > with /rescue/sed, without having to worry about a terminal. > > > > In all other cases: > > fsck -p > > /etc/rc.d/mountcritlocal start > > /etc/rc.d/ldconfig start > > > > And one can use any editor one would want. Don't forget to export or > > setenv TERM to cons25 from 'dumb'. > > From all the discussion I have walked through on the issue of where to > place vi, it does appear FreeBSD has a skewed policy on the issue. There > are plenty of reasons you might need access an editor in single-user > mode - editing fstab is just one. You didn't read what I wrote. The above works in single user mode and does not magically transform you to multi-user. Just reboot in single user mode, type the above and then /usr/bin/vi /etc/rc.conf. You will see that it works. In fact, if you have vim installed, /usr/local/bin/vim /etc/rc.conf will work. -- Mel