Re: [ILUG] UPS Signalling revisited

From: Conor Daly (conor.daly at domain oceanfree.net)
Date: Sat 06 Jul 2002 - 10:41:35 IST


On Fri, Jul 05, 2002 at 01:35:45PM +0100 or so it is rumoured hereabouts,
Declan Grady thought:
> Hi folks,
> Back in september 2000 I asked about UPS signalling from my SCO box to my redhat box, and got a good repsonse:
>
> http://www.linux.ie/pipermail/ilug/2000-September/023179.html
>
> Now that I have 2 linux boxes for firewalling and mail, and I've finally dropped doze from my desktop, I'd like to put something like this in place, so that my SCO box will signal the other 2 boxes to shutdown due to power failure form the ups.
>
> My problem is... I understand the logic of how it will work, but I dont know how to configure this using xinetd instead of inetd.
>
> Any suggestions (newbie'ised)

It's easy enough, all you need do is translate the single line from
/etc/inetd.conf to a file in the /etc/xinetd.d directory. So, one I use
when the firewall brings up the internet connection, for inetd:

[cdaly at domain Hobbiton cdaly]$ grep ppp-up /etc/inetd.conf.rpmsave

ppp-up stream tcp nowait.400 root /etc/ppp/ppp.faenor ppp.faenor up

and for xinetd:

[cdaly at domain Hobbiton cdaly]$ more /etc/xinetd.d/ppp-up

# Converted by inetdconvert
service ppp-up
{
        socket_type = stream
        protocol = tcp
        wait = no
        user = root
        server = /etc/ppp/ppp.faenor
        server_args = up
        disable = no
}

while there's an entry in /etc/services to associate a port number with
this service:

[cdaly at domain Hobbiton cdaly]$ grep ppp /etc/services

ppp-up 7652/tcp

Note the "Converted by inetdconvert" line in the /etc/xinetd.d/ppp-up
file. I presume that happened at upgrade time when I moved from RH6x to
RH7x. You should be able to run that manually... Once the file is in
place in /etc/xinetd, you can mamage that service using "chkconfig"

Conor

-- 
Conor Daly <conor.daly at domain oceanfree.net>
Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
 10:06am  up 43 days, 19:23,  0 users,  load average: 0.08, 0.02, 0.01
Hobbiton.cod.ie
  9:58am  up 17 days,  9:20,  2 users,  load average: 0.06, 0.04, 0.00


This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:17:42 GMT