From d88f662079e5eef78dcd25cf6a18771567af02e8 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 26 Jul 2002 18:22:35 +0000 Subject: use run_program::rooted_get_stdout instead of `chroot $prefix ...` --- perl-install/services.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install/services.pm') 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 ]; } -- cgit v1.2.1