- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: "Syntax error at line 162 ..." appearing in /e...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2006 01:47 PM
07-31-2006 01:47 PM
Syntax error at line 162 : '"' is not matched.
As a result, hostname, net and a number of other run scripts were skipped. The common thing about all of the "Syntax error ..." was that each occurred at basically the identical run script line:
. /etc/rc.config
OR
. /etc/rc.config/netconf -- for net
Does anybody know what happened and how to correct this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2006 01:59 PM
07-31-2006 01:59 PM
SolutionLooks like in the /etc/rc.config.d/netconf file, you are missing a quotaion mark, which is throwing the /sbin/init.d/net script off.
Check the netconf file and find an unclosed quotation mark would be my first suggestion.
Mel.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2006 04:41 PM
07-31-2006 04:41 PM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
As I stated above, no configuration files were changed in the move (and the system worked fine before the move) and the syntax error appears at least 20 times for various run scripts in rc.log. I know that I've seen this error before I can't remember what the fix was. Sorry Mel and it is me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 05:13 AM
08-02-2006 05:13 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
first really look into /etc/rc.config/netconf .
Then look for 'backup files' in /etc/rc.config.d - these have to be moved to another place. Some get sorted out automatically, but ...
This way you can get all line numbers 162 of these files:
cd /etc/rc.config.d
for f in *
do
print -n "$f: "
sed 162!d $f
done
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 06:06 AM
08-02-2006 06:06 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 06:43 AM
08-02-2006 06:43 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 07:01 AM
08-02-2006 07:01 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
Not to beat a dead horse, but 'netconf' could have been changed a long time ago. However, the changes wouldn't have taken effect until reboot.
# ls -l /etc/rc.config.d/netconf
to see last modification of the inode.
Whatever the cause, the solution is just a matter of finding the mismatched quote. It would be more useful to post your netconf.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 07:02 AM
08-02-2006 07:02 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
Also, ensure *only* valid configuration files are in there - no core files, no backup config files, etc.
Reason is several of the /sbin/init.d scripts will source the entire /etc/rc.config.d directory. When that happens and you have a core file or something else that should be in there, bad things result.
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 07:06 AM
08-02-2006 07:06 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
As Mel and Peter have suggested, '/etc/rc.config.d/netconf' may be the culprit.
One approach to finding problems like this is to do:
# sh -vx /etc/rc.config 2>&1|more
For example, by making a deliberate configuration error in 'netconf' by dropping a paired double quote, the above ran and stopped with:
+ [ -f /etc/rc.config.d/netconf -a netconf != core -a netconf = netconf ]
+ . /etc/rc.config.d/netconf
/etc/rc.config[11]: Syntax error at line 98 : `"' is not matched.
The line numbers are *misleading* since I made the error at line-50, but lines 51-85 are comments and the shell didn't "decide" it had a synatx error until near line-98.
However, the sourcing of the '/etc/rc.config.d' directory's files stopped at the first culprit, enabling one to begin to isolate the problem more easily.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 07:13 AM
08-02-2006 07:13 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
With regard to how the '/etc/rc.config.d' directory is processed, it is true that any file therein is a candidate for processing with the *exception* that you *can* have backup copies of files that are *not* processed.
When '/sbin/rc' runs, the '/etc/rc.config.d' directory is examined by the script '/etc/rc.config'. This script skips any file whose basename contains an "extension" that begins with the characters [.,~#].
Thus, it is permissible to have 'netconf' and 'netconf.old'. The '.old' backup will *not* be processed.
If, however, you had kept an old version of your 'netconf' file named as, 'oldnetconf', then *both* 'netconf' and 'oldnetconf' would be sourced. Since the letter "o" follows "n", the result would be undesirable insofar as the last variable declarations seen would be from the wrong file.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 07:15 AM
08-02-2006 07:15 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 07:20 AM
08-02-2006 07:20 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 07:21 AM
08-02-2006 07:21 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 07:24 AM
08-02-2006 07:24 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 07:52 AM
08-02-2006 07:52 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
The previous racks used a Pulizzi to provide failover between power A and power B. The new racks have APC power strips that are supposed to automatically fail over between power A and B as necessary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 08:11 AM
08-02-2006 08:11 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
Well, look at this:
BROADCAST_ADDRESS[1]="11.11.11.255
...there is indeed a missing (closing) double quote!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 08:28 AM
08-02-2006 08:28 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
ll -t /etc/rc.config.d
This sorts the directory so that the most recently changed file(s) jump top the top. NOTE: NEVER, EVER leave junk files or old copies of config files in /etc/rc.config.d. Unlike other directories, this one is 100% executed for *EVERY* startup script and those junk files will cause almost start script to abort. The culprits will be at the top of the list.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 08:34 AM
08-02-2006 08:34 AM
Re: "Syntax error at line 162 ..." appearing in /etc/rc.log
The thing that threw me off was all of the syntax errors in rc.log, including one that occurred before it referenced netconf.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 08:38 AM
08-02-2006 08:38 AM