6 $cvs_path = &has_command($config{'cvs'});
8 $cvs_inet_name = "cvspserver";
9 $has_xinetd = &foreign_check("xinetd");
10 $has_inetd = &foreign_check("inetd");
13 # Find out if cvs is being run from inetd or xinetd
17 &foreign_require("xinetd", "xinetd-lib.pl");
18 local @xic = &xinetd::get_xinetd_config();
24 local (%portmap, $s, $a, $i);
25 &foreign_require("inetd", "inetd-lib.pl");
26 foreach $s (&inetd::list_services()) {
27 $portmap{$s->[1]} = $s;
28 foreach $a (split(/\s+/, $s->[4])) {
32 foreach $i (&inetd::list_inets()) {
33 if (($i->[8] eq $cvs_path || $i->[8] eq $config{'cvs'}) &&
34 $portmap{$i->[3]}->[2] == $cvs_port) {
36 return { 'type' => 'inetd',