1833847 Members
2343 Online
110063 Solutions
New Discussion

rc script source problem

 
Wendell Jefferson
New Member

rc script source problem

I recently received a ignite backup of a HP 744 machine. The backup is HP-UX 10.20 that has custom software on it. Upon restoring the software to my HP 744 machine it would not boot correctly. As soon as it started the login prompt would appear. No service startup messages, just the error "-p: This is not an identifier". Most of the rc scripts would fail if they came to a line that sourced another file. I was able to identify the exact line in the hostname rc file that causes the error. When the script reaches ". /sbin/rc.config" (If I remember correctly) it gives a "-p: This is not an identifier." error and the script bails. Entering the command line I noticed I was unable to source files manually. The same error would result. I have looked through the forums and found the "^M: This is not an identifier." but I don't think this is the issue. I also wondered if this could be a patch issue, but this problem obviously does not exist on the original machine. Has anyone seen something similar to this?
5 REPLIES 5
Sridhar Bhaskarla
Honored Contributor

Re: rc script source problem

Hi,

There could be one corrupted script amongst /etc/rc.config.d/ files. I would do the following after going into single user mode.

#cd /etc/rc.config.d
#for i in *
>do
>. ./$i
>echo $i just ran
>read
>done

You will find the file that is giving out this error. You can fix it then.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Patrick Wallek
Honored Contributor

Re: rc script source problem

The first thing I would do is check through the /etc/rc.config.d directory and make sure that there isn't anything there that shouldn't be. Make sure there are NO backups of original files in there.

ALL files in /etc/rc.config.d get sourced at startup and those environment variables are used by the system when booting. If there is a file that doesn't belong, or a backup file with old values, then you could potentially shoot yourself in the foot.
John Poff
Honored Contributor

Re: rc script source problem

Hi,

It sounds like maybe you have a corrupt rc.config file. I looked on one of our 10.20 boxes, and we don't have an /sbin/rc.config file. We do have a /etc/rc.config file. I've posted it as an attachment. Maybe you can compare yours to mine to see if anything is different. It makes sense that your box wouldn't go through any of the service startup messages if your rc.config file is corrupt, as rc.config is what drives the sourcing of all the config files.

JP
Steve Steel
Honored Contributor

Re: rc script source problem

Hi


Couold be a difference in existing users and groups on your machine.


See if any of the startup software has a numeric user or group id.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Wendell Jefferson
New Member

Re: rc script source problem

Thank you for the responses thus far. The replies led me to discover several problems. Patrick and John are correct about /etc/rc.config.d not /sbin/rc.config.d file. This file appears just as the attached file sent by John. I did discover permission problems as Steve has suggested. Here is additional information on the problem.

Upon boot I am dumped into a root prompt so I never login. However when I su, I get a password prompt and then a "su:no shell" error. I found the /sbin/sh file had permissions of 000 and 0 file size. Copied it over from another machine. Now I receive a login prompt when booting, as well as the "-p: This is not an identifer". Somewere in the level 1 scripts it bails. I performed a find of all the zero byte files. The list seems like more than some of the normal /dev files. It was suggested that I attempt the Ignite restore on another machine. Hopefully this will yield more information.