summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2012-04-22 20:56:05 +0000
committerColin Guthrie <colin@mageia.org>2012-04-22 20:56:05 +0000
commitee8810407f38ad085df8235c60f6ed0b05863882 (patch)
treef14e3702089b70b3141844686c96c8d3c186fc84
parent74f6ced69f545957e4a4306641bb1006f55fb537 (diff)
downloaddrakx-ee8810407f38ad085df8235c60f6ed0b05863882.tar
drakx-ee8810407f38ad085df8235c60f6ed0b05863882.tar.gz
drakx-ee8810407f38ad085df8235c60f6ed0b05863882.tar.bz2
drakx-ee8810407f38ad085df8235c60f6ed0b05863882.tar.xz
drakx-ee8810407f38ad085df8235c60f6ed0b05863882.zip
Split xinetd services out such that they can be handled separately from systemd units.
-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);