1833052 Members
2669 Online
110049 Solutions
New Discussion

rc.log warning

 
SOLVED
Go to solution
Lonny Balderston
Frequent Advisor

rc.log warning

/etc/rc.log contains 30+ of the following type of warning/error (2 samples); any idea what is going on here; things seem to be working OK regardless:

[sample #1]
Setting hostname
Output from "/sbin/rc1.d/S320hostname start":
----------------------------
/sbin/rc1.d/S320hostname[36]: Start: not found.

[sample #2]
Start Internet services daemon
Output from "/sbin/rc2.d/S500inetd start":
----------------------------
/sbin/rc2.d/S500inetd[37]: Start: not found.
Internet Services started

Thank you!
8 REPLIES 8
Alex Lavrov.
Honored Contributor

Re: rc.log warning

I guess that there is some mistype in the script. For some reson it tries to execute "Start".

If you can paste here the source of the script, we'll see the problem.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Lonny Balderston
Frequent Advisor

Re: rc.log warning

The two scripts follow:
[/sbin/rc1.d/S320hostname]
#!/sbin/sh
#
# @(#) $Revision: 72.10 $
#
# NOTE: This script is not configurable! Any changes made to this
# scipt will be overwritten when you upgrade to the next
# release of HP-UX.
#
# WARNING: Changing this script in any way may lead to a system that
# is unbootable. Do not modify this script.
#

#
# Set hostname
#

PATH=/sbin:/usr/sbin:/usr/bin
export PATH

rval=0
set_return() {
x=$?
if [ $x -ne 0 ]; then
echo "EXIT CODE: $x"
rval=1
fi
}

case $1 in
start_msg)
echo "Setting hostname"
;;

start)
if [ -f /etc/rc.config ] ; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi

hostname $HOSTNAME
set_return

if [ -z "$NODENAME" ] ; then
uname -S ${HOSTNAME%%.*}
else
uname -S $NODENAME
fi
set_return

setuname -s $OPERATING_SYSTEM -t
set_return
;;

*)
echo "usage: $0 {start}"
;;
esac

exit $rval
[/sbin/rc2.d/S500inetd]
#!/sbin/sh
#
# @(#) inetd $Revision: 1.4.214.2 $ $Date: 96/10/08 13:24:29 $
#
# Copyright (C) 1993, 1994 Hewlett-Packard Company
#
# NOTE: This script is not configurable! Any changes made to this
# script will be overwritten when you upgrade to the next
# release of HP-UX.
#
unset UNIX95
PRE_U95=true;export PRE_U95;

PATH=/sbin:/usr/sbin:/usr/bin
export PATH

rval=0
set_return() {
x=$?
if [ $x -ne 0 ]; then
echo "EXIT CODE: $x"
rval=1 # always 1 so that 2 can be used for other reasons
fi
}

case "$1" in
start_msg)
echo "Start Internet services daemon"
;;

stop_msg)
echo "Stopping Internet services daemon"
;;

'start')
if [ -f /etc/rc.config ]; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi

mask=`umask`
umask 000

[ -x /usr/sbin/inetd ] && /usr/sbin/inetd $INETD_ARGS
set_return
if [ $rval -eq 0 ]; then
echo "Internet Services started"
else
echo "Unable to start Internet Services"
fi

umask $mask
;;

'stop')
if [ -f /etc/rc.config ]; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi

/usr/sbin/inetd -k
set_return
if [ $rval -eq 0 ]; then
echo "Internet Services stopped"
else
echo "Unable to stop Internet Services"
fi
;;

*)
echo "usage: $0 {start|stop}"
rval=1
;;
esac

exit $rval
##############################
Thank you!
Alex Lavrov.
Honored Contributor

Re: rc.log warning

From just looking at it, I don't see a problem and I don't have an HPUX to try it on, but you can execute this line:
sh -x /sbin/rc1.d/S320hostname start

And you'll see what line gives you the error ...


Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Bill Hassell
Honored Contributor
Solution

Re: rc.log warning

Check in /sbin/init.d for junk and temp files. Same with /etc/rc.config.d. The fastest way to find these rogue files is to use ll -t (sorted by most recent time):

ll -t /sbin/init.d
ll -t /etc/rc.config.d

You cannot store any test files or temp files in these directories, particularly in /etc/rc.config.d.


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: rc.log warning

Just a note about troubleshooting scripts. The error message tells all:

/sbin/rc2.d/S500inetd[37]: Start: not found.

If you look at line 37 of the inetd script, you'll see where it sources (reads) a script called /etc/rc.config, which in turn runs all the scripts in the /etc/rc.config.d/ directory. Look for "Start" in that directory.


Bill Hassell, sysadmin
Devender Khatana
Honored Contributor

Re: rc.log warning

Hi,

Can post the output of the command as suggested above as well.

#sh -x /sbin/rc1.d/S320hostname start

HTH,
Devender
Impossible itself mentions "I m possible"
Amit Agarwal_1
Trusted Contributor

Re: rc.log warning

please verify the content of /sbin/rc file. Looks like there is some typo in that file. Please look for the lines calling add_list() function.

The syntax must be either of
add_list "$name start" "$descrip"
or
add_list "$name stop" "$descrip"

The "start" and "stop" keywords must be completely lower-case.

Regards,
Amit
Sreedhar Nathani
Valued Contributor

Re: rc.log warning

/sbin/rc1.d/S320hostname[36]: Start: not found.
/sbin/rc2.d/S500inetd[37]: Start: not found.

Its contains . /etc/rc.config in above files.

Its seems there is a duplicate file/ non hpux configuration file exists in this /etc/rc.config.d directory. Please move the file to different directory.