summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-11-03 10:14:27 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-11-03 10:14:27 +0000
commit678f5cf1ad0ea2ddaded4125d8f9315eb760c1b0 (patch)
treed6c0ebfe573720642f4ecf9528b3657644d49826 /perl-install
parentd493d50174b413b3d04cfbd0ab25efc527dd8d8b (diff)
downloaddrakx-678f5cf1ad0ea2ddaded4125d8f9315eb760c1b0.tar
drakx-678f5cf1ad0ea2ddaded4125d8f9315eb760c1b0.tar.gz
drakx-678f5cf1ad0ea2ddaded4125d8f9315eb760c1b0.tar.bz2
drakx-678f5cf1ad0ea2ddaded4125d8f9315eb760c1b0.tar.xz
drakx-678f5cf1ad0ea2ddaded4125d8f9315eb760c1b0.zip
don't use /root/tmp if /root doesn't exist (fixes using it in rescue)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/run_program.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm
index 7e6e94368..c6eb456b8 100644
--- a/perl-install/run_program.pm
+++ b/perl-install/run_program.pm
@@ -54,9 +54,8 @@ sub raw {
$root ? ($root .= '/') : ($root = '');
- $ENV{HOME} || $::isInstall or $ENV{HOME} = '/root'; # TO REMOVE
my $tmpdir = sub {
- my $dir = $::isInstall ? '/tmp' : $< == 0 ? '/root/tmp' : "$ENV{HOME}/tmp";
+ my $dir = $< != 0 ? "$ENV{HOME}/tmp" : -d '/root' ? '/root/tmp' : '/tmp';
-d $dir or mkdir($dir, 0700);
$dir;
};