diff --git a/lib/filesystem.js b/lib/filesystem.js index d626658d..c7e103de 100644 --- a/lib/filesystem.js +++ b/lib/filesystem.js @@ -142,7 +142,10 @@ function fsSize(drive, callback) { execSync('cat /proc/mounts 2>/dev/null').toString().split('\n').filter(line => { return line.startsWith('/'); }).forEach((line) => { - osMounts[line.split(' ')[0]] = line.toLowerCase().indexOf('rw') >= 0; + osMounts[line.split(' ')[0]] = osMounts[line.split(' ')[0]] ?? false; + if (line.toLowerCase().indexOf('/snap/') === -1) { + osMounts[line.split(' ')[0]] = ((line.toLowerCase().indexOf('rw,') >= 0 || line.toLowerCase().indexOf(' rw ') >= 0)); + } }); } catch (e) { util.noop(); diff --git a/lib/osinfo.js b/lib/osinfo.js index 754593fb..4c870448 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -180,7 +180,8 @@ function getFQDN() { util.noop(); } } - } if (_freebsd || _openbsd || _netbsd) { + } + if (_freebsd || _openbsd || _netbsd) { try { const stdout = execSync('hostname 2>/dev/null'); fqdn = stdout.toString().split(os.EOL)[0];