osInfo() improved uefi parsing (FreeBSD)
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ function inetChecksite(url, callback) {
|
||||
let urlSanitized = '';
|
||||
const s = util.sanitizeShellString(url, true);
|
||||
for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
|
||||
if (!s[i] !== undefined) {
|
||||
if (s[i] !== undefined) {
|
||||
s[i].__proto__.toLowerCase = util.stringToLower;
|
||||
const sl = s[i].toLowerCase();
|
||||
if (sl && sl[0] && !sl[1] && sl[0].length === 1) {
|
||||
|
||||
+3
-1
@@ -268,7 +268,9 @@ function osInfo(callback) {
|
||||
const logofile = util.getValue(lines, 'kern.ostype');
|
||||
const release = util.getValue(lines, 'kern.osrelease').split('-')[0];
|
||||
const serial = util.getValue(lines, 'kern.uuid');
|
||||
const uefi = util.getValue(lines, 'machdep.bootmethod').toLowerCase().indexOf('uefi') >= 0;
|
||||
const bootmethod = util.getValue(lines, 'machdep.bootmethod');
|
||||
const uefiConf = stdout.toString().indexOf('<type>efi</type>') >= 0;
|
||||
const uefi = bootmethod ? bootmethod.toLowerCase().indexOf('uefi') >= 0 : (uefiConf ? uefiConf : null);
|
||||
result.distro = distro || result.distro;
|
||||
result.logofile = logofile || result.logofile;
|
||||
result.release = release || result.release;
|
||||
|
||||
Reference in New Issue
Block a user