From 49f22f802bd519b4c7273fcd15d82348d38bedf3 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 22 Apr 2012 20:56:05 +0000 Subject: Split xinetd services out such that they can be handled separately from systemd units. --- perl-install/services.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'perl-install') 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); -- cgit v1.2.1