Skip to content

Commit

Permalink
Fix not working with autofs home
Browse files Browse the repository at this point in the history
  • Loading branch information
bryant1410 committed Sep 24, 2018
1 parent f7663bc commit a9831da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osutil/nfs_linux.go
Expand Up @@ -35,7 +35,7 @@ func IsHomeUsingNFS() (bool, error) {
return false, fmt.Errorf("cannot parse %s: %s", procSelfMountInfo, err)
}
for _, entry := range mountinfo {
if (entry.FsType == "nfs4" || entry.FsType == "nfs") && (strings.HasPrefix(entry.MountDir, "/home/") || entry.MountDir == "/home") {
if (entry.FsType == "nfs4" || entry.FsType == "nfs" || entry.FsType == "autofs") && (strings.HasPrefix(entry.MountDir, "/home/") || entry.MountDir == "/home") {
return true, nil
}
}
Expand All @@ -44,7 +44,7 @@ func IsHomeUsingNFS() (bool, error) {
return false, fmt.Errorf("cannot parse %s: %s", etcFstab, err)
}
for _, entry := range fstab.Entries {
if (entry.Type == "nfs4" || entry.Type == "nfs") && (strings.HasPrefix(entry.Dir, "/home/") || entry.Dir == "/home") {
if (entry.Type == "nfs4" || entry.Type == "nfs" || entry.Type == "autofs") && (strings.HasPrefix(entry.Dir, "/home/") || entry.Dir == "/home") {
return true, nil
}
}
Expand Down

0 comments on commit a9831da

Please sign in to comment.