summaryrefslogtreecommitdiffstats
path: root/perl-install/services.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-26 18:22:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-26 18:22:35 +0000
commitd88f662079e5eef78dcd25cf6a18771567af02e8 (patch)
tree3bec3af8789c05fa0a42f0b26b5ebee4c75f81b4 /perl-install/services.pm
parent892bee6477c534b72ea8fbad40385fe6b2147069 (diff)
downloaddrakx-backup-do-not-use-d88f662079e5eef78dcd25cf6a18771567af02e8.tar
drakx-backup-do-not-use-d88f662079e5eef78dcd25cf6a18771567af02e8.tar.gz
drakx-backup-do-not-use-d88f662079e5eef78dcd25cf6a18771567af02e8.tar.bz2
drakx-backup-do-not-use-d88f662079e5eef78dcd25cf6a18771567af02e8.tar.xz
drakx-backup-do-not-use-d88f662079e5eef78dcd25cf6a18771567af02e8.zip
use run_program::rooted_get_stdout instead of `chroot $prefix ...`
Diffstat (limited to 'perl-install/services.pm')
-rw-r--r--perl-install/services.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm
index a4dbc8e3a..38e7839b3 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -280,8 +280,9 @@ sub doit {
#--- the listref of "on" services
sub services {
my ($prefix) = @_;
- my $cmd = $prefix && !$::testing ? "chroot $prefix" : "";
- my @l = map { [ /([^\s:]+)/, /\bon\b/ ] } grep { !/:$/ } sort `LANGUAGE=C $cmd /sbin/chkconfig --list`;
+ local $ENV{LANGUAGE} = 'C';
+ my @raw_l = run_program::rooted_get_stdout($prefix, '/sbin/chkconfig', '--list');
+ my @l = map { [ /([^\s:]+)/, /\bon\b/ ] } grep { !/:$/ } sort @raw_l;
[ map { $_->[0] } @l ], [ map { $_->[0] } grep { $_->[1] } @l ];
}