Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Nov 2001 15:49:32 -0600
From:      Mike Meyer <mwm@mired.org>
To:        Kent Stewart <kstewart@owt.com>
Cc:        questions@freebsd.org
Subject:   Re: Vi a Joke ?
Message-ID:  <15354.53228.792684.130499@guru.mired.org>
In-Reply-To: <34871309@toto.iv>

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

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.

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

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Q: How do you make the gods laugh?		A: Tell them your plans.

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?15354.53228.792684.130499>