From owner-freebsd-stable Sat Sep 14 2:56:20 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 368D537B400 for ; Sat, 14 Sep 2002 02:56:18 -0700 (PDT) Received: from lurza.secnetix.de (lurza.secnetix.de [212.66.1.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7212B43E42 for ; Sat, 14 Sep 2002 02:56:17 -0700 (PDT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [IPv6:::1]) by lurza.secnetix.de (8.12.5/8.12.5) with ESMTP id g8E9uDmC095754 for ; Sat, 14 Sep 2002 11:56:15 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.12.5/8.12.5/Submit) id g8E9uDxJ095753; Sat, 14 Sep 2002 11:56:13 +0200 (CEST) Date: Sat, 14 Sep 2002 11:56:13 +0200 (CEST) Message-Id: <200209140956.g8E9uDxJ095753@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG Reply-To: freebsd-stable@FreeBSD.ORG Subject: Re: Re: In-Reply-To: <006201c25bb4$ab0bbfb0$0c01a8c0@aristotle> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.6-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [quoting repaired] Jon Longoria wrote: > glbj@verizon.net wrote: > > Jon Longoria 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