1833756 Members
2594 Online
110063 Solutions
New Discussion

Re: Error in /etc/rc.log

 
Lora Ganeva
Regular Advisor

Error in /etc/rc.log

After reboot of HP-UX 10.20 the following error occurs in many startup scripts from /sbin
Synatx error on line 7:"(" is not expected.
File systems are mounted without errors.
Any help would be appreciated.





22 REPLIES 22
Bill McNAMARA_1
Honored Contributor

Re: Error in /etc/rc.log

can you attach the contents of the rc.log / dmesg o/p

Have a look in /etc/rc.config.d and /etc/rc.config also for 'strange' things.

Bill
It works for me (tm)
Santosh Nair_1
Honored Contributor

Re: Error in /etc/rc.log

Since its occurring in many scripts, I would think that there is a stray ( in one of the configuration files, i.e. in /etc/rc.config.d/*. Check to see which was the last modified file and check for syntax

-Santosh
Life is what's happening while you're busy making other plans
Lora Ganeva
Regular Advisor

Re: Error in /etc/rc.log

The error actually appears on those rows in startup files, where configuration files in /etc/rc.config.d are sourced.
Robin Wakefield
Honored Contributor

Re: Error in /etc/rc.log

Hi Lora,

Sounds like /etc/rc.config, since this is sourced in many, but not all of the startup scripts.

Rgds, Robin.
Lora Ganeva
Regular Advisor

Re: Error in /etc/rc.log

Hi,
the problem is in /etc/rc.config.d but no changes were made..So what could be the problem?
Robin Wakefield
Honored Contributor

Re: Error in /etc/rc.log

Hi,

Run "sh -x /etc/rc.config" and see at what point the error occurs.

Rgds, Robin.
Lora Ganeva
Regular Advisor

Re: Error in /etc/rc.log

when manually sourcing everything is okay
Bill McNAMARA_1
Honored Contributor

Re: Error in /etc/rc.log

Have a look in the scripts in /sbin/init.d and vi * and look at all line 7's!

I'm sure we can pull out a script?

cd /sbin/init.d
head -l 8 * |more

cd /etc/rc.config.d
head -l 8 * |more

head -l 8 /etc/rc.config

Good luck,
Bill
It works for me (tm)
Bill McNAMARA_1
Honored Contributor

Re: Error in /etc/rc.log

# find . * | xargs grep -n "(" |grep ":7:"

This will show you which files from the current dir have a ( in line 7

Later,
Bill
It works for me (tm)
Robin Wakefield
Honored Contributor

Re: Error in /etc/rc.log

Hi Lora,

Is it still happening when you reboot.

What is immediately to the left of "Syntax error..."?

Robin.
Carlos Fernandez Riera
Honored Contributor

Re: Error in /etc/rc.log


1- startup follow a sequence of files, order by their names:

1- /sbin/rc1.d/S*
2 /sbin/rc2.d/S*
3- /sbin/rc3.d/S*


#####
Configure system crash dumps
Output from "/sbin/rc1.d/S080crashconf start":
----------------------------
EXIT CODE: 0

Mount file systems
Output from "/sbin/rc1.d/S100localmount start":
----------------------------
#####
So you can scritp file following log.

2- You can check scripts file too.

cd /sbin/init.d

for file in *
do
echo $file
/sbin/sh -n $file
done

-n flag checks scripts for syntax errors, without execute them.





unsupported
Lora Ganeva
Regular Advisor

Re: Error in /etc/rc.log

thanks a lot.Checking found no errors
Santosh Nair_1
Honored Contributor

Re: Error in /etc/rc.log

Have you always gotten this error or has this recently started happening... you might be able to check /etc/rc.log.old for previous bootup errors.

Not sure if this was mentioned, but did you check /etc/rc.config for this error.

Finally, the error doesn't have to be on line 7, there could be some other syntax error prior to that line or in some other file that's being source before that line.

-Santosh
Life is what's happening while you're busy making other plans
Carlos Fernandez Riera
Honored Contributor

Re: Error in /etc/rc.log

can you attach the rc.log file ?
unsupported
Lora Ganeva
Regular Advisor

Re: Error in /etc/rc.log

Everything is okay when manually sourcing and executing the scripts-the problem is only when booting and this is the first time when it appears
Robin Wakefield
Honored Contributor

Re: Error in /etc/rc.log

Hi Lora,

Can you let us know the exact error that you're seeing in rc.log, especially the beginning of the line.

Thanks, Robin
Carlos Fernandez Riera
Honored Contributor

Re: Error in /etc/rc.log

I guess roots shell is still /sbin/sh.

Have you changed default sh for root in /etc/passwd?

unsupported
Sanjay_6
Honored Contributor

Re: Error in /etc/rc.log

Hi Lora,

Attach your /etc/rc.log file and /etc/rc.config file. You should have done that earlier. I see so many people asking you to attach /etc/rc.log, but i don't see any attachment. The two files should be easy to attach. IS there a problem ?.

Thanks
Lora Ganeva
Regular Advisor

Re: Error in /etc/rc.log

I cannot attach these files, because I do not have such permissions.Anyway, the problem is solved.Thank You all.
Sanjay_6
Honored Contributor

Re: Error in /etc/rc.log

Hi Lora,

Atleast tell us what was the solution ?.

Thanks and have a nice day

regds
Carlos Fernandez Riera
Honored Contributor

Re: Error in /etc/rc.log

Yes please,i am very curious.
unsupported
Lora Ganeva
Regular Advisor

Re: Error in /etc/rc.log

Hi again,
I can't call it a solution for any situation, but our system administrator has found out that when a file with special characters is in the /etc/rc.config.d directory, there is a problem with sourcing. there was a file #ots and when the "#" was removed, everything was okay.
Thanks again