summaryrefslogtreecommitdiffstats
path: root/perl-install/fs/mount_point.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/fs/mount_point.pm')
-rw-r--r--perl-install/fs/mount_point.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/fs/mount_point.pm b/perl-install/fs/mount_point.pm
index 7918ea08f..e56c330c0 100644
--- a/perl-install/fs/mount_point.pm
+++ b/perl-install/fs/mount_point.pm
@@ -24,7 +24,10 @@ sub guess_mount_point {
my $d = $handle->{dir};
my $mnt = find { -e "$d/$l{$_}" } keys %l;
$mnt ||= (stat("$d/.bashrc"))[4] ? '/root' : '/home/user' . ++$$user if -e "$d/.bashrc";
- $mnt ||= (any { -d $_ && (stat($_))[4] >= 500 && -e "$_/.bashrc" } glob_($d)) ? '/home' : '';
+ $mnt ||= (any { -d $_ && (stat($_))[4] >= 1000 && -e "$_/.bashrc" } glob_($d)) ? '/home' : '';
+ # Keep uid 500 here for guesswork, but base it on .bash_history to increase
+ # changes it's a real user.
+ $mnt ||= (any { -d $_ && (stat($_))[4] >= 500 && -e "$_/.bash_history" } glob_($d)) ? '/home' : '';
($mnt, $handle);
}