Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Sep 2002 11:56:13 +0200 (CEST)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: Re:
Message-ID:  <200209140956.g8E9uDxJ095753@lurza.secnetix.de>
In-Reply-To: <006201c25bb4$ab0bbfb0$0c01a8c0@aristotle>

next in thread | previous in thread | raw e-mail | index | archive | help
[quoting repaired]

Jon Longoria <jon.longoria@dfwgroove.com> wrote:
 > glbj@verizon.net wrote:
 > > Jon Longoria <jon.longoria@dfwgroove.com> wrote:
 > > I may be stating the obvious but the following:
 > > >
 > > > /etc/rc: 427 Syntax error: ";;" unexpected (expecting "fi")
 > > > Enter full pathname of shell or RETURN for /bin/sh:
 > > >
 > >
 > > looks like there is an incorrectly terminated 'if' in /etc/rc.
 > > I've just gotten 4.6 up (I'll worry about *.2 later) so I don't
 > > know if the /etc/rc I have matches yours. A close look at that
 > > script might be a place to start anyway.
 > 
 > Yea, i was trying to bring it up to check that line, but both vi and ee
 > won't show to console proper, so its a bit of a catch22 for me.

You have everything you need in single-user mode.  To
display the lines surrounding that error (with line
numbers), this command will do it:

# echo 417,437n | ed /etc/rc

To actually edit the file and fix the problem, you can
also use ed interactively; I'd suggest you read the ed(1)
manpage.  Every sysadmin _should_ be able to work with
/bin/ed in case of emergency, IMO.

By the way, editing /etc/rc in single-user mode requires
to remount it read-write (default after reboot is read-
only):

# fsck -p / && mount -u -o rw /

Having said that -- if the syntax error in /etc/rc is
the only problem on that machine, you could of course
mount the other partitions and then use vi or ee if you
prefer:

# fsck -p && mount -a -t nonfs

That will also enable you to read the ed(1) manpage.  ;-)

Regards
   Oliver

PS:  The Solaris manpage of ed(1) says at the very beginning
of the "DESCRIPTION" section:  "The ed utility is the
standard text editor."

I'd vote for adopting that sentence for our manpage.  :-)

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

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




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