fsSize: rw /snap issue fixed (linux)
This commit is contained in:
parent
014d618d21
commit
a0c41f51b9
@ -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();
|
||||
|
||||
@ -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];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user