From 678f5cf1ad0ea2ddaded4125d8f9315eb760c1b0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 3 Nov 2005 10:14:27 +0000 Subject: don't use /root/tmp if /root doesn't exist (fixes using it in rescue) --- perl-install/run_program.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'perl-install/run_program.pm') 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; }; -- cgit v1.2.1