summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-29 19:51:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-29 19:51:11 +0000
commitd06faa0d7f768a517071968e82b11ae00b5a768f (patch)
treeb5618f2a49e3e111cc0595d3fd79cb86e96cd151 /perl-install
parent3543e784946c745946c9a0b267ee450dbbd6456b (diff)
downloaddrakx-d06faa0d7f768a517071968e82b11ae00b5a768f.tar
drakx-d06faa0d7f768a517071968e82b11ae00b5a768f.tar.gz
drakx-d06faa0d7f768a517071968e82b11ae00b5a768f.tar.bz2
drakx-d06faa0d7f768a517071968e82b11ae00b5a768f.tar.xz
drakx-d06faa0d7f768a517071968e82b11ae00b5a768f.zip
fix rooted() when chrooted and saving the result in a perl variable
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/run_program.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm
index 9d93fd315..5468fdd25 100644
--- a/perl-install/run_program.pm
+++ b/perl-install/run_program.pm
@@ -41,8 +41,8 @@ sub rooted {
($stderr_mode, $stderr_raw, @args) = @args if $args[0] =~ /^2>>?$/;
$ENV{HOME} || $::isInstall or die q($HOME is unset, so I don't know where to put my temporary files);
- my $stdout = $stdout_raw && (ref($stdout_raw) ? "$ENV{HOME}/tmp/.drakx-stdout.$$" : $stdout_raw);
- my $stderr = $stderr_raw && (ref($stderr_raw) ? "$ENV{HOME}/tmp/.drakx-stderr.$$" : $stderr_raw);
+ my $stdout = $stdout_raw && (ref($stdout_raw) ? "$ENV{HOME}/tmp/.drakx-stdout.$$" : "$root$stdout_raw");
+ my $stderr = $stderr_raw && (ref($stderr_raw) ? "$ENV{HOME}/tmp/.drakx-stderr.$$" : "$root$stderr_raw");
if (my $pid = fork) {
waitpid $pid, 0;
@@ -68,13 +68,13 @@ sub rooted {
if ($stderr && $stderr eq 'STDERR') {
} elsif ($stderr) {
$stderr_mode =~ s/2//;
- open STDERR, "$stderr_mode $root$stderr" or die "run_program can't output in $root$stderr (mode `$stderr_mode')";
+ open STDERR, "$stderr_mode $stderr" or die "run_program can't output in $stderr (mode `$stderr_mode')";
} elsif ($::isInstall) {
open STDERR, ">> /tmp/ddebug.log" or open STDOUT, ">> /dev/tty7" or die "run_program can't log, give me access to /tmp/ddebug.log";
}
if ($stdout && $stdout eq 'STDOUT') {
} elsif ($stdout) {
- open STDOUT, "$stdout_mode $root$stdout" or die "run_program can't output in $root$stdout (mode `$stdout_mode')";
+ open STDOUT, "$stdout_mode $stdout" or die "run_program can't output in $stdout (mode `$stdout_mode')";
} elsif ($::isInstall) {
open STDOUT, ">> /tmp/ddebug.log" or open STDOUT, ">> /dev/tty7" or die "run_program can't log, give me access to /tmp/ddebug.log";
}