Operating System - HP-UX
1834227 Members
2842 Online
110066 Solutions
New Discussion

rc error during init of the system

 
Marcin Piwko
Advisor

rc error during init of the system

Hello.
Fore some reboots, I suffer from strange behaviour of /sbin/rc script, that normally executes startup tasks bu launching apropriate scripts with the dot (.) command.
For instance it executes
. /sbin/rc.utils
and other scripts.
And here is the problem: the dot (.) command instead reading into memory and than executin script, aborts and displays always the same message (here is the sample):

# . /sbin/rc1.d/K630named start
sh: Syntax error: `)' is not expected.

And so on and on during other scripts.
It results with the system without inetd started and other important things.

I suppose /sbin/sh is faulty of not executing dot (.) internal command well,but checked versions with other machines and it looks well.

Please help !
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: rc error during init of the system

Is any of this going into /var/adm/syslog/syslog.log?

If so, post some of it please.

Do the scripts run if done as root from the command line after boot?

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John Palmer
Honored Contributor

Re: rc error during init of the system

Hi,

You are suffering from a faulty configuration script in /etc/rc.config.d.

Some of the startup scripts, named being one call /etc/rc.config. This calls most files in /etc/rc.config.d as subscripts in order to set environment variables. One of these has a syntax error.

Have a look at which configuration scripts have changed recently. Test each possible suspect script by running it e.g.
. /etc/rc.config.d/netconf

Regards,
John
James R. Ferguson
Acclaimed Contributor

Re: rc error during init of the system

Hi:

Have a look in '/etc/rc.config.d/'. You probably have a bungled file therein. The files in this directory are sourced by '/etc/rc.config'. You can run this (and or modify a copy of it, having added an echo statement to announce the file it is analyzing in order to assist you in finding the culprit.

Regards!

...JRF...
Marcin Piwko
Advisor

Re: rc error during init of the system

I disagree the problem lies in some of the scripts inside the rc.config.d directory. The message is ALWAYS the same, no matter which script is executed sequentially by rc. Here is the sample from /etc/rc.log which confirms that:

Initialize loadable modules***********************
Output from "/sbin/rc1.d/S112kminit start":
----------------------------
/sbin/rc1.d/S112kminit[207]: Syntax error at line 79 : `)' is not expected.
"/sbin/rc1.d/S112kminit start" SKIPPED
Configure system crash dumps
Setting hostnamein/rc1.d/S080crashconf start":
Output from "/sbin/rc1.d/S320hostname start":
----------------------------tart" SKIPPED
/sbin/rc1.d/S320hostname[36]: Syntax error at line 79 : `)' is not expected.
Start multicast routing daemon
Output from "/sbin/rc2.d/S490mrouted start":
----------------------------
/sbin/rc2.d/S490mrouted[38]: Syntax error at line 79 : `)' is not expected.

Start Internet services daemon
Output from "/sbin/rc2.d/S500inetd start":
----------------------------
/sbin/rc2.d/S500inetd[37]: Syntax error at line 79 : `)' is not expected.

Start dynamic routing daemon
Output from "/sbin/rc2.d/S510gated start":
----------------------------
/sbin/rc2.d/S510gated[37]: Syntax error at line 79 : `)' is not expected.


(HP/UX ver 11.00)

Jean-Louis Phelix
Honored Contributor

Re: rc error during init of the system

Hi,

Try to execute :

$ sh -x /etc/rc.config

which sources all configuration files (no execution !) and see where and why it stops.

Regards.
It works for me (© Bill McNAMARA ...)
John Palmer
Honored Contributor

Re: rc error during init of the system

What's to disagree about?

Line 207 of kminit reads:
. $ETC/rc.config
Line 36 of hostname reads:
. /etc/rc.config

So every error is caused by running the script /etc/rc.config.

You have a script in /etc/rc.config.d which has a syntax error at line 79. The fact that it has at least 79 lines should make it easy to isolate, most have less lines than that.

My guess would be netconf.

Regards,
John
Marcin Piwko
Advisor

Re: rc error during init of the system

Thank you, all your suggestions were right, the faulty script was /rc.config.d/lp

Surprisingly, it has been altered year ago and nobody noticed the trouble ?!