Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Nov 2001 14:15:19 -0800
From:      Kent Stewart <kstewart@owt.com>
To:        Mike Meyer <mwm@mired.org>
Cc:        questions@freebsd.org
Subject:   Re: Vi a Joke ?
Message-ID:  <3BFAD5F7.3060902@owt.com>
References:  <15354.53228.792684.130499@guru.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help


Mike Meyer wrote:

> Kent Stewart <kstewart@owt.com> types:
> 
>>Anthony Atkielski wrote:
>>
>>>>One point people forget and that is what can
>>>>you use when you mess up rc.conf and your system
>>>>will only boot into single user mode. Learning
>>>>vi at that point is a painic :).
>>>>
>>>Can't you just restore the previous copy of the file and reboot?  You made a
>>>backup copy of the last bootable version of the file before you changed it,
>>>right?
>>>
>>It is all too often a one line change and no one does a backup then. 
>>That is what gets them in trouble to begin with. It doesn't happen that 
>>often and I have always been able to mount /usr and correct the error 
>>using my editor of choice. The thing you can't do is re-ftp a corrected 
>>version or do an nfs_mount to pick up the backup. Occasionally, we see 
>>files that are corrupt because they have <cr><lf>'s on the end of the line.
>>
> 
> I keep such configuration files in a source management system. The
> benefits of doing so are enormous, and I recommend doing so for
> everyone. One of the benefits is that you can always get the old
> version of a config file back.


I have several almost identical systems as far as hardware is concerned. 
What works on one can be used on the others. The software is different 
but things like NIC's, video, and sounds cards are identical models.

I was introduced to vi when we were getting setup to run our benchmarks 
on the uni-processor Cray they setup on your system. By the time better 
editors came along I was too set in my ways :).


> 
> The catch is that getting the old version back requires the source
> management system be accessible. You either have to be able to fix the
> file with ed, or know enough to bring up the subsystems needed to get
> to the management system by hand.


I have never found that I couldn't "mount -a". I do it all of the time 
when it comes to doing an installworld. In the few times where I bungled 
a quote, I could mount everything then too.


> 
> As an aside, if you leave /usr on /, your editor of choice should be
> available anyway, right?


I setup / as a 250MB partition and /usr is much larger. I also have a 
separate /var and /tmp. I found that splitting /usr/src and /usr/obj out 
was a speed advantage during buildworlds. I have 4 UDMA-100 controllers 
and the HD's are all on different controllers. Having the system, 
source, and output on different controllers was worth about a 1/3 
reduction in clock time.

Kent

-- 
Kent Stewart
Richland, WA

mailto:kbstew99@hotmail.com
http://users.owt.com/kstewart/index.html
FreeBSD News http://daily.daemonnews.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BFAD5F7.3060902>