summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-09-14 12:10:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-09-14 12:10:39 +0000
commit2e4e08d930e3557c1190c5c3b3c12e5ed95186a0 (patch)
treed49396465878076fffb0e1ecf616745835f1d76d /perl-install
parent616ece2710ae41a0d69d4da0e69404d697746798 (diff)
downloaddrakx-2e4e08d930e3557c1190c5c3b3c12e5ed95186a0.tar
drakx-2e4e08d930e3557c1190c5c3b3c12e5ed95186a0.tar.gz
drakx-2e4e08d930e3557c1190c5c3b3c12e5ed95186a0.tar.bz2
drakx-2e4e08d930e3557c1190c5c3b3c12e5ed95186a0.tar.xz
drakx-2e4e08d930e3557c1190c5c3b3c12e5ed95186a0.zip
force our tmpdir to /root/tmp when root and not isInstall
(fixes installkernel being called with sudo and not sudo -H) (thanks to fred crozat!)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/run_program.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm
index 26b73a2d0..f74edb5b6 100644
--- a/perl-install/run_program.pm
+++ b/perl-install/run_program.pm
@@ -54,9 +54,9 @@ sub raw {
$root ? ($root .= '/') : ($root = '');
- $ENV{HOME} || $::isInstall or $ENV{HOME} = '/root';
+ $ENV{HOME} || $::isInstall or $ENV{HOME} = '/root'; # TO REMOVE
my $tmpdir = sub {
- my $dir = "$ENV{HOME}/tmp";
+ my $dir = $::isInstall ? '/tmp' : $< == 0 ? '/root/tmp' : "$ENV{HOME}/tmp";
-d $dir or mkdir($dir, 0700);
$dir;
};