Bug 74402

Summary: /etc/rc.conf: Syntax error: Unterminated quoted string
Product: Base System Reporter: Shen <shxxb>
Component: confAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Shen 2004-11-26 08:10:18 UTC
Added some lines in /etc/rc.conf file, but made the mistake use a ' instead of a ", during boot processing, the error is: 

/etc/rc.conf: 79: Syntax error: Unterminated quoted string
Enter full path name of shell or RETURN for /bin/sh:

Now the problem is even entered /bin/sh, still do not have any function can change this configration file, even "vi" is not available
Comment 1 David G. Lawrence 2004-11-26 09:07:32 UTC
> >Description:
> Added some lines in /etc/rc.conf file, but made the mistake use a ' instead of a ", during boot processing, the error is: 
> 
> /etc/rc.conf: 79: Syntax error: Unterminated quoted string
> Enter full path name of shell or RETURN for /bin/sh:
> 
> Now the problem is even entered /bin/sh, still do not have any function can change this configration file, even "vi" is not available

   Do this:

   mount -a
   vi /etc/rc.conf

-DG

David G. Lawrence
President
Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500
TeraSolutions, Inc. - http://www.terasolutions.com - (888) 346 7175
The FreeBSD Project - http://www.freebsd.org
Pave the road of life with opportunities.
Comment 2 gemei2 2004-11-26 09:18:37 UTC
On Fri, Nov 26, 2004 at 08:02:15AM +0000, Shen wrote:
> /etc/rc.conf: 79: Syntax error: Unterminated quoted string
> Enter full path name of shell or RETURN for /bin/sh:
> 
> Now the problem is even entered /bin/sh, still do not have any function can change this configration file, even "vi" is not available

After entering the single user mode, only your root filesystem
is mounted. If /usr (vi lives in /usr/bin) is a separate
filesystem, you have to mount it first. Try

# mount -a -t ufs
# /usr/bin/vi /etc/rc.conf

/GM
Comment 3 Ceri Davies freebsd_committer freebsd_triage 2004-11-26 09:32:48 UTC
State Changed
From-To: open->closed

Good advice has been given in followups.  Please do not file a bug 
report for this kind of thing in future.
Comment 4 freebsd 2004-11-26 22:44:20 UTC
in message <200411260802.iAQ82FjP081972@www.freebsd.org>,
wrote Shen thusly...
>
> Added some lines in /etc/rc.conf file, but made the mistake use a
> ' instead of a "

I suppose in either case the quotes, single or double, were balanced.
That is, you eneded up w/ something like...

  var='value'


...and neither of the below two...

  var="value'
  var='value"


> , during boot processing, the error is: 
> 
> /etc/rc.conf: 79: Syntax error: Unterminated quoted string
> Enter full path name of shell or RETURN for /bin/sh:
> 
> Now the problem is even entered /bin/sh, still do not have any
> function can change this configration file, even "vi" is not
> available

There is (s)ed (when vi usage is impossible), but before that at least
/ partition will need to be mounted read/write.


  - Parv

--