summaryrefslogtreecommitdiffstats
path: root/perl-install/services.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-07-24 10:49:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-07-24 10:49:46 +0000
commit916ae6acd4bd90da774693e0030f560e1af1b773 (patch)
tree39080a0128dd3d34cf9b92c0ab7d7f421d950a44 /perl-install/services.pm
parent7e5672eb837597a08dc886dc022f704be9b97665 (diff)
downloaddrakx-backup-do-not-use-916ae6acd4bd90da774693e0030f560e1af1b773.tar
drakx-backup-do-not-use-916ae6acd4bd90da774693e0030f560e1af1b773.tar.gz
drakx-backup-do-not-use-916ae6acd4bd90da774693e0030f560e1af1b773.tar.bz2
drakx-backup-do-not-use-916ae6acd4bd90da774693e0030f560e1af1b773.tar.xz
drakx-backup-do-not-use-916ae6acd4bd90da774693e0030f560e1af1b773.zip
removed/renamed unused/seldom-used functions
Diffstat (limited to 'perl-install/services.pm')
-rw-r--r--perl-install/services.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm
index 7d24d389e..9b05474f8 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -269,7 +269,17 @@ sub services {
my ($prefix) = @_;
my $cmd = $prefix && !$::testing ? "chroot $prefix" : "";
my @l = map { [ /([^\s:]+)/, /\bon\b/ ] } grep { !/:$/ } sort `LANGUAGE=C $cmd /sbin/chkconfig --list`;
- [ map { $_->[0] } @l ], [ mapgrep { $_->[1], $_->[0] } @l ];
+ [ map { $_->[0] } @l ], [ map { $_->[0] } grep { $_->[1] } @l ];
+}
+
+sub mapgrep(&@) {
+ my $f = shift;
+ my @l;
+ foreach (@_) {
+ my ($b, $v) = $f->($_);
+ push @l, $v if $b;
+ }
+ @l;
}
1;