Skip to content
  • David Johnson's avatar
    Add Linux os_islocaldir_alt for Docker. · ce93b70f
    David Johnson authored
    (right now, specifically only for Docker, but could potentially be used
    for any crazy container impl where the local filesystem doesn't appear
    local to df -l.  From the commit:)
    
      Some environments do not give us a valid / mount (like Docker); thus,
      df -l does not work.  Thus we must rely on /proc/mounts to tell us if
      a dir is local or not.  Well, ok, /proc/mounts is hard (and potential
      bind mount chains would make it harder).  So instead, we assume that /
      is local, (well, we check to ensure it is not NFS in /proc/mounts),
      and use os_samefs above to ensure that $dir is on the same device as
      /.  If that is true, that is good enough to call it a local dir.
    ce93b70f