Operating System - HP-UX
1820257 Members
2797 Online
109622 Solutions
New Discussion юеВ

the right way to stop/start inetd ??

 
SOLVED
Go to solution
someone_4
Honored Contributor

the right way to stop/start inetd ??

Hello ..
I have noticed there are allot of differnt ways to start inetd. Is there on right or wrong way to do it?

to kill :
inetd -k
or
/sbin/init.d/inetd stop

to start:

inetd

gives me

root 6666 1 0 15:51:22 ? 0:00 inetd

Then:

/sbin/init.d/inetd start
Internet Services started

/sbin/init.d/inetd[53]: umask: The specified number is not valid for this comman
d.

root 6706 1 0 15:52:00 ? 0:00 /usr/sbin/inetd

or:

/usr/sbin/inetd

root 6810 1 0 15:53:09 ? 0:00 /usr/sbin/inetd

is there one way to stop and start? Or does it really matter? Why would I get an error with /sbin/init.d/inetd start ?

Thanks
Richard
11 REPLIES 11
Jeff Schussele
Honored Contributor
Solution

Re: the right way to stop/start inetd ??

Hi Richard,

/sbin/init.d/inetd start (stop)

are the proper ways. These scripts call the inet binary out of /usr/sbin.

Not sure why you are getting the umask complaint, but I suspect it's something in the conf file.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
S.K. Chan
Honored Contributor

Re: the right way to stop/start inetd ??

The correct way to stop it are ..
# inetd -k
or
send the SIGTERM signal to the inetd process
# kill -15

To start, always use ..

# /sbin/init.d/inetd start
S.K. Chan
Honored Contributor

Re: the right way to stop/start inetd ??

Oh .. the umask error you're seeing .. check /etc/inetd.conf and I bet you got an invalid umask defined in one of the services, maybe the the ftpd entry .. ?
Sridhar Bhaskarla
Honored Contributor

Re: the right way to stop/start inetd ??

Richard,

The simplest way I have is

"inetd -c"

-c is equivalent to SIGHUP

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

Re: the right way to stop/start inetd ??

Hi Richard,

Try "inetd -c" to restart inetd. inetd will reread its configuration file /etc/inetd.conf.

Hope this helps.

Regds
Uday_S_Ankolekar
Honored Contributor

Re: the right way to stop/start inetd ??

Hello,

inetd -c will reread the configuration file /etc/inetd.conf

/sbin/init.d/inetd stop , /sbin/init.d/start would kill all inetd process and restart.

inetd -k will kill the process (SIGHUP)

Check your inetd.conf file in /etc for the error you are getting.

Goodluck
-USA..
Good Luck..
someone_4
Honored Contributor

Re: the right way to stop/start inetd ??

hmmm so basicly they all do the same thing .. =)

Richard
Sridhar Bhaskarla
Honored Contributor

Re: the right way to stop/start inetd ??

Well,

inetd -k and the start up scripts will take the system out of network until inetd starts. Inetd -c or SIGHUP can be issued without having to sacrifice the network outage.

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

Re: the right way to stop/start inetd ??

Depends....

If you've just made conf changes & want to implement them - then you do the inetd -c.

If you want to stop inet services totally then do the /sbin/init.d/inetd stop OR the inetd -k

I prefer to use the HP scripts for start & stops just to be safe - but thats just me.

Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Craig Rants
Honored Contributor

Re: the right way to stop/start inetd ??

I use /sbin/init.d/inetd stop/start

I've never had a problem or an network outage, it still leaves the current telnet, ftp... connections alive.

Just my thoughts,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Darrell Allen
Honored Contributor

Re: the right way to stop/start inetd ??

Hi Richard,

I prefer to use rc scripts if they exist to start and stop daemons. That generally ensures everything is done properly.

I don't stop inetd. I may disable some of its services at times by changing inetd.conf. Then I simply use "inetd -c" to reread the config.

I don't guess it hurts to stop inetd and restart it. Just be aware that no one will be able to rlogin, telnet, or use any other inetd controlled services until you start inetd again.

/sbin/init.d/inetd uses the umask command to capture the current setting, temporarily change it to 000 before starting inetd, then resetting umask to the saved setting. Why? I don't know. Child processes of inetd should inherit it's umask so they must need a 000 umask.

Anyway, my /sbin/init.d/inetd's start section looks like:

'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
;;


Line 53 is "umask $mask". You should check into why that gives you an error. I'd start by seeing what "umask" without an argument returns.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)