Fixing FreeBSD /etc/rc.conf typos

I just finished installing gnome 2.12 this afternoon on my FreeBSD 6.0 desktop, and wanted to reboot the system to test out the gdm_enable line I added to /etc/rc.conf. When I rebooted the box, I was greeted with the following error:

Loading configuration files.
/etc/rc.conf: 20: Syntax error: Unterminated quoted string

Ack – it looks like I forgot to properly quote the “YES” value of the name=value pair in /etc/rec.conf. I thought to myself, no problem, I will just fire up vi and fix this anomaly:

$ vi /etc/rc.conf

ex/vi: Error: /var/tmp/vi.recover: Read-only file system

Ack – now the file system is mounted Read-only and I need to write to it! Not to fear, mount’s “-w” option is here:

$ mount -w /vmlinuz

$ vi /tmp/rc.conf

[ edit here ]

I have done this numerous times with Solaris using “mount -o remount,” but this was the first time I needed to do this with FreeBSD. Nice!

This article was posted by Matty on 2006-01-18 18:25:00 -0400 -0400