]> git.pld-linux.org Git - packages/VMware-server.git/blame - VMware-server-config-rc-inetd.patch
- vmware configured
[packages/VMware-server.git] / VMware-server-config-rc-inetd.patch
CommitLineData
2efa4384
ER
1--- vmware-server-distrib/bin/vmware-config.pl 2007-11-09 14:22:03.000000000 +0200
2+++ vmware-server-distrib/bin/vmware-config.pl 2008-04-07 14:56:57.510937518 +0300
14fa334b
ER
3@@ -7499,6 +7500,7 @@
4 my $inetd_conf = "/etc/inetd.conf";
5 my $xinetd_conf = "/etc/xinetd.conf";
6 my $xinetd_dir = "/etc/xinetd.d";
7+ my $rcinetd_dir = "/etc/sysconfig/rc-inetd";
8 my $success = 0;
9 my $port;
10
11@@ -7550,12 +7552,16 @@
12 . ' clients on other machines.' . "\n", 0);
13 }
14
15+ if (-d $rcinetd_dir) {
16+ $success = configure_rcinetd($rcinetd_dir, $port);
17+ }
18+
19 # check for xinetd
20 # XXX Could be a problem, as they could start xinetd with '-f config_file'.
21 # We could do a ps -ax, look for xinetd, parse the line, find the config
22 # file, parse the config file to find the xinet.d directory. Bah. Or
23 # parse if from the init.d script somewhere. If they use init.d.
24- if (check_is_running('xinetd')) {
25+ if (!$success && check_is_running('xinetd')) {
26 if (open(CONF, $xinetd_conf)) {
27 # Let's try to find it here
28 while (<CONF>) {
29@@ -7732,6 +7738,17 @@
30 }
31 }
32
33+#Restart rc-inetd
34+sub restart_rcinetd {
35+ my $rcinetd_restart = db_get_answer('INITSCRIPTSDIR') . '/rc-inetd';
36+ if (-e $rcinetd_restart) {
37+ if (!system(shell_string($rcinetd_restart) . ' restart')) {
38+ return;
39+ }
40+ }
41+}
42+
43+
44 # Update the Internet super-server's configuration file, and make the
45 # super-server read it
46 sub configure_xinetd {
47@@ -7758,6 +7775,26 @@
48 restart_xinetd();
49 }
50
51+# Update the Internet super-server's configuration file, and make the
52+# super-server read it
53+sub configure_rcinetd {
54+ my $conf_dir = shift;
55+ my $port = shift;
56+
57+ my $authd_conf_file = "$conf_dir/vmware-authd";
58+ my $authd = db_get_answer('SBINDIR') . "/vmware-authd";
59+
60+ my %patch = ( '%port%' => $port, '%authd%' => $authd );
61+
761eaca6 62+ install_file(db_get_answer('LIBDIR') . '/configurator/authd-rc-inetd.conf',
14fa334b
ER
63+ $authd_conf_file, \%patch,
64+ $cFlagTimestamp | $cFlagConfig);
65+
66+ restart_rcinetd();
67+ return 1;
68+}
69+
70+
71 # Setup the hostd configuration files
72 sub configure_hostd {
73 my %patch;
This page took 0.042103 seconds and 4 git commands to generate.