summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/services.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm
index 6a77844e9..3814cedba 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -213,7 +213,7 @@ sub ask_ {
sub ask_standalone_gtk {
my ($_in) = @_;
my ($l, $on_services) = services();
- my @xinetd_services = map { $_->[0] } @{(services_raw())[1]};
+ my @xinetd_services = xinetd_services();
require ugtk2;
ugtk2->import(qw(:wrappers :create));
@@ -336,6 +336,17 @@ sub doit {
}
}
+sub xinetd_services() {
+ local $ENV{LANGUAGE} = 'C';
+ my @xinetd_services;
+ foreach (run_program::rooted_get_stdout($::prefix, '/sbin/chkconfig', '--list', '--type', 'xinetd')) {
+ if (my ($xinetd_name, $on_off) = m!^\t(\S+):\s*(on|off)!) {
+ push @xinetd_services, [ $xinetd_name, $on_off eq 'on' ];
+ }
+ }
+ map { $_->[0] } @xinetd_services;
+}
+
sub services_raw() {
local $ENV{LANGUAGE} = 'C';
my (@services, @xinetd_services);