[csw-maintainers] cswinetd and cswetcservices?

Ben Walton bwalton at opencsw.org
Wed May 5 17:37:32 CEST 2010


Excerpts from Darin Perusich's message of Wed May 05 11:25:11 -0400 2010:

Hi Darin,

> Does the cswetcservices class check to see if a service is already
> listed in /etc/services before adding it? I've updated the Amanda
> package to use this class instead of a postinstall script and it's
> added the services again, i.e they are listed twice.

It tries to.  The heuristic used to determine whether or not to add
the line is:

/usr/xpg4/bin/grep -q "^$svcname[[:space:]].*$port_proto.*$PKGINST" /etc/services

The lines added by the CAS include a '# CSWfoo' as a suffix to
indicate they were added by the script.  I guess the detection should
likely just look for: "^$svcname[[:space:]].*$port_proto"

This would better handle things not added/maintained by the script
itself and thus situations like yours.  Do you see anything wrong with
this for your (or other) uses?

(The r.cswetcservices script doesn't alter the /etc/services file at
all...)

I need to review some docs (and personal uses) of the cswinetd script
to answer the other question...

Thanks
-Ben
-- 
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302



More information about the maintainers mailing list