diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-26 18:22:35 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-26 18:22:35 +0000 |
commit | d88f662079e5eef78dcd25cf6a18771567af02e8 (patch) | |
tree | 3bec3af8789c05fa0a42f0b26b5ebee4c75f81b4 | |
parent | 892bee6477c534b72ea8fbad40385fe6b2147069 (diff) | |
download | drakx-d88f662079e5eef78dcd25cf6a18771567af02e8.tar drakx-d88f662079e5eef78dcd25cf6a18771567af02e8.tar.gz drakx-d88f662079e5eef78dcd25cf6a18771567af02e8.tar.bz2 drakx-d88f662079e5eef78dcd25cf6a18771567af02e8.tar.xz drakx-d88f662079e5eef78dcd25cf6a18771567af02e8.zip |
use run_program::rooted_get_stdout instead of `chroot $prefix ...`
-rw-r--r-- | perl-install/any.pm | 3 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 2 | ||||
-rw-r--r-- | perl-install/services.pm | 5 |
3 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 9d7da9d37..47de00273 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -820,8 +820,7 @@ sub ask_users { sub autologin { my ($prefix, $o, $in) = @_; - my $cmd = $prefix ? "chroot $prefix" : ""; - my @wm = (split (' ', `$cmd /usr/sbin/chksession -l 2>/dev/null`)); + my @wm = split(' ', run_program::rooted_get_stdout($prefix, '/usr/sbin/chksession', '-l')); my @users = map { $_->{name} } @{$o->{users} || []}; if (@wm > 1 && @users && !$o->{authentication}{NIS} && $o->{security} <= 2) { diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index b4f1fb97d..176f65e37 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -559,7 +559,7 @@ sub updateModulesFromFloppy { log::l("examining updated modules for kernel $kernelVersion"); if (-d "/floppy/$kernelVersion") { my @src_files = glob_("/floppy/$kernelVersion/*"); - my @dest_files = split "\n", `chroot $o->{prefix} find /lib/modules`; + my @dest_files = map { chomp_($_) } run_program::rooted_get_stdout($o->{prefix}, 'find', '/lib/modules'); foreach my $s (@src_files) { log::l("found updatable module $s"); my ($sfile, $sext) = $s =~ /([^\/\.]*\.o)(?:\.gz|\.bz2)?$/; 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 ]; } |