diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-09-14 12:10:39 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-09-14 12:10:39 +0000 |
commit | 2e4e08d930e3557c1190c5c3b3c12e5ed95186a0 (patch) | |
tree | d49396465878076fffb0e1ecf616745835f1d76d /perl-install | |
parent | 616ece2710ae41a0d69d4da0e69404d697746798 (diff) | |
download | drakx-backup-do-not-use-2e4e08d930e3557c1190c5c3b3c12e5ed95186a0.tar drakx-backup-do-not-use-2e4e08d930e3557c1190c5c3b3c12e5ed95186a0.tar.gz drakx-backup-do-not-use-2e4e08d930e3557c1190c5c3b3c12e5ed95186a0.tar.bz2 drakx-backup-do-not-use-2e4e08d930e3557c1190c5c3b3c12e5ed95186a0.tar.xz drakx-backup-do-not-use-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.pm | 4 |
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; }; |