Operating System - HP-UX
1826348 Members
4199 Online
109692 Solutions
New Discussion

Start or stop /sbin/init.d services

 
SOLVED
Go to solution
nightwich
Valued Contributor

Start or stop /sbin/init.d services

Hello,

I have this strange problem.

When i do start/stop of a service get a lot of messages.

For exemple if i do:

root@porx0401:/sbin/init.d> ./xntpd start
./xntpd[37]: 2: not found.
./xntpd[37]: ^M^[[3g^[[49: not found.
./xntpd[37]: 9H^[H^[[49: not found.
./xntpd[37]: 17H^[H^[[49: not found.
./xntpd[37]: 25H^[H^[[49: not found.
./xntpd[37]: 33H^[H^[[49: not found.
./xntpd[37]: 41H^[H^[[49: not found.
./xntpd[37]: 49H^[H^[[49: not found.
./xntpd[37]: 57H^[H^[[49: not found.
./xntpd[37]: 65H^[H^[[49: not found.
./xntpd[37]: 73H^[H^[[49: not found.
./xntpd[37]: 81H^[H^[[49: not found.
./xntpd[37]: 89H^[H^[[49: not found.
./xntpd[37]: 97H^[H^[[49: not found.
./xntpd[37]: 105H^[H^[[49: not found.
./xntpd[37]: 113H^[H^[[49: not found.
./xntpd[37]: 121H^[H^[[49: not found.
./xntpd[37]: 129H^[H^[[49: not found.
./xntpd[37]: 137H^[H^M^[[49: not found.
./xntpd[37]: 1H^[[?25h^[[?1hporx0401:/etc/rc.config.d: not found.
./xntpd[37]: 1H^[[48Bporx0401:/etc/rc.config.d: not found.
./xntpd[37]: 1H^[[48B^[[K/^H^[[K^[[7mNo: not found.
./xntpd[37]: 1Hmesvrs^H^G^G^G^G^G^G^G^G^G: not found.
15 Jan 15:30:16 ntpdate[5188]: step time server 172.28.7.1 offset -0.010840 sec

Any ideas, what this could be?

Regards.
14 REPLIES 14
Patrick Wallek
Honored Contributor

Re: Start or stop /sbin/init.d services

It appears to me that you have a lot of garbage characters in the xntpd script.

Have a look at the script, around line 37, and see what it looks like.
Ivan Krastev
Honored Contributor

Re: Start or stop /sbin/init.d services

Line 37 is - '. /etc/rc.config'

Check this file for errors.


regards,
ivan
Geoff Wild
Honored Contributor

Re: Start or stop /sbin/init.d services

Get a new xntpd script....

Grab one from another server -as yours has been corrupted...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Franky_1
Respected Contributor

Re: Start or stop /sbin/init.d services

Hi nightwich,

line 37 indicates /etc/rc.config (this script sources configuration files for various subsystems) please check if the entries there are correct

Regards

Franky
Don't worry be happy
A. Clay Stephenson
Acclaimed Contributor

Re: Start or stop /sbin/init.d services

You probably have a bogus file in /etc/rc.config.d. When rc is run it sources all the files in /etc/rc.config.d so all it takes to produce truly bizarre rc behavior is something as seemingly innocent as this:

cd /etc/rc.config.d
ls > mylistoffiles

Now, all would be well until the machine were shutdown or restarted and then /etc/rc.config.d/mylistoffiles would also be sourced for every rc'ed script.

Make sure that there are no files in /etc/rc.config.d which do not belong there.
If it ain't broke, I can fix that.
nightwich
Valued Contributor

Re: Start or stop /sbin/init.d services

Hi all,

Sorry for my late reply.

The problem occours with any serveci:

root@porx0401:/sbin/init.d> ./sendmail stop
./sendmail[117]: 2: not found.
./sendmail[117]: ^M^[[3g^[[49: not found.
./sendmail[117]: 9H^[H^[[49: not found.
./sendmail[117]: 17H^[H^[[49: not found.
./sendmail[117]: 25H^[H^[[49: not found.
./sendmail[117]: 33H^[H^[[49: not found.
./sendmail[117]: 41H^[H^[[49: not found.
./sendmail[117]: 49H^[H^[[49: not found.
./sendmail[117]: 57H^[H^[[49: not found.
./sendmail[117]: 65H^[H^[[49: not found.
./sendmail[117]: 73H^[H^[[49: not found.
./sendmail[117]: 81H^[H^[[49: not found.
./sendmail[117]: 89H^[H^[[49: not found.
./sendmail[117]: 97H^[H^[[49: not found.
./sendmail[117]: 105H^[H^[[49: not found.
./sendmail[117]: 113H^[H^[[49: not found.
./sendmail[117]: 121H^[H^[[49: not found.
./sendmail[117]: 129H^[H^[[49: not found.
./sendmail[117]: 137H^[H^M^[[49: not found.
./sendmail[117]: 1H^[[?25h^[[?1hporx0401:/etc/rc.config.d: not found.
./sendmail[117]: 1H^[[48Bporx0401:/etc/rc.config.d: not found.
./sendmail[117]: 1H^[[48B^[[K/^H^[[K^[[7mNo: not found.
./sendmail[117]: 1Hmesvrs^H^G^G^G^G^G^G^G^G^G: not found.
No sendmail server running


I already check my /etc/rc.config looks fine to me ..

any ideas ?

Tanks in advance.
Patrick Wallek
Honored Contributor

Re: Start or stop /sbin/init.d services

Something is definitely wrong somewhere in /etc/rc.config.d. If you check line 117 of the sendmail script, you will probably see that that is where it sources /etc/rc.config.d.

Post an 'ls /etc/rc.config.d' or 'll /etc/rc.config.d' so we can take a look at the files there.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Start or stop /sbin/init.d services

Do this:

cd /etc/rc.config.d
cat * > /tmp/mylist

Now examine /tmp/mylist with a text editor (e.g. vi) and you are going to find one section of that files that looks very different --- that's your problem.
If it ain't broke, I can fix that.
nightwich
Valued Contributor

Re: Start or stop /sbin/init.d services

Hi all,

My real problem is in . /etc/rc.config

root@porx0401:/etc/rc.config.d> . /etc/rc.config
sh: 2: not found.
sh: ^M^[[3g^[[49: not found.
sh: 9H^[H^[[49: not found.
sh: 17H^[H^[[49: not found.
sh: 25H^[H^[[49: not found.
sh: 33H^[H^[[49: not found.
sh: 41H^[H^[[49: not found.
sh: 49H^[H^[[49: not found.
sh: 57H^[H^[[49: not found.
sh: 65H^[H^[[49: not found.
sh: 73H^[H^[[49: not found.
sh: 81H^[H^[[49: not found.
sh: 89H^[H^[[49: not found.
sh: 97H^[H^[[49: not found.
sh: 105H^[H^[[49: not found.
sh: 113H^[H^[[49: not found.
sh: 121H^[H^[[49: not found.
sh: 129H^[H^[[49: not found.
sh: 137H^[H^M^[[49: not found.
sh: 1H^[[?25h^[[?1hporx0401:/etc/rc.config.d: not found.
sh: 1H^[[48Bporx0401:/etc/rc.config.d: not found.
sh: 1H^[[48B^[[K/^H^[[K^[[7mNo: not found.
sh: 1Hmesvrs^H^G^G^G^G^G^G^G^G^G: not found.
root@porx0401:/etc/rc.config.d>


One ls of my /etc/rc.config.d/

root@porx0401:/etc/rc.config.d> ls
LANG desktop hpws_webproxyconf ptydaemon
Rpcd diagnostic hpws_xmltoolsconf pwgr
SnmpHpunix ems i4lmd samba
SnmpMaster emsagtconf kl savecrash
SnmpMib2 eus kminit set_date
SnmpTrpDst fc_fcd_conf list_mode slsd
acct fc_td_conf lp sshd
audio hparamgr ls swconfig
auditing hparray mailservs syncer
cde hpbtlanconf namesvrs syslogd
cifsclient hpetherconf nddconf tps
cimserver hpfcmsconf netconf vlanconf
clean hpfddi4conf netdaemons vt
clean_tmps hpgelanconf nettl webadmin
clean_uucp hpietherconf nfsconf xf86
comsec hpigelanconf pci_olar xfs
crashconf hpws_apacheconf pd
cron hpws_tomcatconf pdcinfo
dce hpws_webminconf prngd

What can cause this ?

Thanks,
V. Nyga
Honored Contributor

Re: Start or stop /sbin/init.d services

Hi,

with 'ls' you don't see special characters!
Even 'del' can create such caracters in a file name.
Do like ACS said or use the file manager to see the whole file names.

Volkmar
*** Say 'Thanks' with Kudos ***
nightwich
Valued Contributor

Re: Start or stop /sbin/init.d services

Hello all,

I do like ACD said and i figher out what is the problem.

Seems that i have a file with rong caractheres that don't beelong to /etc/rc.config.d

Thanks for the greate help

Regards ;)
Dennis Handly
Acclaimed Contributor

Re: Start or stop /sbin/init.d services

>Volkmar: with 'ls' you don't see special characters! ... use the file manager to see the whole file names.

No need, that would be giving in to the dark side. ;-)
Use "ll -ab" to see everything even unprintable chars.

You could also search for those control-Gs:
fgrep ^G /sbin/init.d/*
nightwich
Valued Contributor

Re: Start or stop /sbin/init.d services

Hi,

Problem Solve.
Thanks for the great help

Regards
Matti_Kurkela
Honored Contributor

Re: Start or stop /sbin/init.d services

Whenever /etc/rc.config is executed, it reads *all* the files in /etc/rc.config.d.

In general, /etc/rc.config should never be modified, so it's likely that those garbage characters are coming from some file in /etc/rc.config.d.

To identify the file, run:

cd /etc/rc.config.d
for FILE in *; do echo $FILE; . ./$FILE; done

Normally, this should just output a list of files in the /etc/rc.config.d directory.
Any other output (error messages similar to what your service start/stop scripts are producing) will be caused by the file listed *just before* the extra output.

MK
MK