1833051 Members
2321 Online
110049 Solutions
New Discussion

/sbin/rc[61]: Error

 
Tuncay Ozisik
New Member

/sbin/rc[61]: Error

Hi All,
I have HP Visualize C200 running HP-UX 10.20.
When I boot the system I can get the following error:
/sbin/rc[61]: ^M: not found
" "
" "
...
It is also indicated in /etc/rc.log. Also /etc/rc.log file consists ;

"/sbin/rc1.d/S320hostname start" FAILED
...
/sb??n/rc1.d/S320hostname[36]: ^M: not found.
" "
" "
...errors.

Then, in start-up progress, Setting Hostname : [FAIL] message.

I make all network configurations and then the system pings outside, FTP works fine etc. But CDE fails to start. The hostname is mercur and I get response from

# hostname
# uname -a

commands.

Can anybody help me about this problem?

Thanks for now.
12 REPLIES 12
Sridhar Bhaskarla
Honored Contributor

Re: /sbin/rc[61]: Error

Hi Tuncay,

Check your /etc/rc.config.d/netconf file and look at the syntax of this file.

Also try to set the hostname manually by runnign the command /sbin/init.d/hostname start

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
harry d brown jr
Honored Contributor

Re: /sbin/rc[61]: Error

What does your /etc/rc.config.d/ directories file look like?

I think you have some bad filenames in there!!!

/etc/rc.config does this:

for CFG_FILE in /etc/rc.config.d/* /etc/TIMEZONE
do
fname=${CFG_FILE##*/} # get file basename
if [ -f $CFG_FILE -a "$fname" != "core" -a "${fname##*[.,~\#]}" = "$fnam
e" ]
then . $CFG_FILE # source a valid config file
fi
done




live free or die
harry
Live Free or Die
Mark Greene_1
Honored Contributor

Re: /sbin/rc[61]: Error

on my 10.20 system, line 61 of /sbin/rc is:

. /etc/rc.config

so either you have a carriage return (the ^M) embedded in the /sbin/rc script on that line or the line above, or there is one in the file /etc/rc.config. Do "cat -v /sbin/rc" to see if this is the case. You can remove it with vi, with the "set list" option turned on to see the control-codes.

HTH
mark
the future will be a lot like now, only later
Helen French
Honored Contributor

Re: /sbin/rc[61]: Error

Hi Tuncay:

The first thing I would check is the files under /etc/rc.config.d directory. If you see any unwanted files under this ( may be somebody accidently moved some commands here), then remove it and reboot the system. Boot in single user mode and check this. That may solve the issue.

HTH,
Shiju
Life is a promise, fulfill it!
hpuxrox
Respected Contributor

Re: /sbin/rc[61]: Error

Try this,

dos2ux rc > file ; mv file1 rc

This should strip the ^M's out.

Jeff Schussele
Honored Contributor

Re: /sbin/rc[61]: Error

Hi Tuncay,

The S320hostname script in /sbin/rc1.d is failing.

1)Check that the file that it links to - /sbin/init.d/hostname has not been deleted or corrupted.

2) Check the config file for this script /etc/rc.config.d/hostname has not been deleted or corrupted.


HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
ashish nanjiani
Frequent Advisor

Re: /sbin/rc[61]: Error

looks like something wrong with the script. Have you tried running the script manually as root as see if you get the same error?
Pete Randall
Outstanding Contributor

Re: /sbin/rc[61]: Error

Tuncay,

The easiest way to make sure the hostname is not misconfigured somewhere would be to run
/sbin/set_parms hostname

If that doesn't straighten it out, then you've got other problems.

Pete

Pete
hpuxrox
Respected Contributor

Re: /sbin/rc[61]: Error

First of all, has someone been opening these files via a windows machine? The ^M is the return Character on windows. So if any files are being accessed by Micro$oft applications this can happen.

I suggest fixing the file manualy or with the dos2ux command as posted earlier.

-Yates
Bill McNAMARA_1
Honored Contributor

Re: /sbin/rc[61]: Error

Check line 36
of
/sb??n/rc1.d/S320hostname
for the ^M error.

dos2ux /sb??n/rc1.d/S320hostname > /tmp/S320hostname

mv /sb??n/rc1.d/S320hostname /S320hostname.old
mv /tmp/S320hostname /sb??n/rc1.d/S320hostname

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

Re: /sbin/rc[61]: Error

Hi,

two points to check:
- somebody seems to have transferred file from a windows machine using "ftp" in ASCII mode to your HP-UX server, never do this (as you get those "^M" at the end of each line)
- maybe somebody tried to keep "backups" of the original files in "/etc/rc.config.d/", again: never do this as ALL files in that directory are used, regardless of filenames!

Just my $0.02,
Wodisch
Tuncay Ozisik
New Member

Re: /sbin/rc[61]: Error

Hi everybody,

Yes, you solved the "/sbin/rc[61]:^M: not found" problem, thank you very much. The problem was the /sbin/rc.config.d/netconf and file that is full of ^M. Also, there was some ^M codes in the /etc/hosts file. I used vi editor with the set list option to see this codes. Then, I removed all with the dos2ux utility. After the network setup with SAM, the system started to work normally. I did not touch netconf file on HP-UX server via FTP or any unix editor, how is that possible? Only I transferred once the hosts file from Windows via FTP. Anyway, the problem solved!

Thanks again,
astro

Tuncay Ozisik