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
commit49f22f802bd519b4c7273fcd15d82348d38bedf3 (patch)
treef14e3702089b70b3141844686c96c8d3c186fc84
parenta999bb45db9b668637495998b2c8adc9ad684d07 (diff)
downloaddrakx-backup-do-not-use-49f22f802bd519b4c7273fcd15d82348d38bedf3.tar
drakx-backup-do-not-use-49f22f802bd519b4c7273fcd15d82348d38bedf3.tar.gz
drakx-backup-do-not-use-49f22f802bd519b4c7273fcd15d82348d38bedf3.tar.bz2
drakx-backup-do-not-use-49f22f802bd519b4c7273fcd15d82348d38bedf3.tar.xz
drakx-backup-do-not-use-49f22f802bd519b4c7273fcd15d82348d38bedf3.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);