From 2e4e08d930e3557c1190c5c3b3c12e5ed95186a0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 14 Sep 2005 12:10:39 +0000 Subject: 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!) --- perl-install/run_program.pm | 4 ++-- 1 file 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; }; -- cgit v1.2.1