uuid() improved parsing machine id (linux)

This commit is contained in:
Sebastian Hildebrandt 2024-03-16 15:51:42 +01:00
parent 1c6e0f048b
commit 6a410cde1e
5 changed files with 12 additions and 6 deletions

View File

@ -83,6 +83,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment | | Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- | | ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.22.4 | 2024-03-16 | `uuid()` improved parsing machine id (linux) |
| 5.22.3 | 2024-03-15 | `chassis()` improved parsing memory bank (windows) | | 5.22.3 | 2024-03-15 | `chassis()` improved parsing memory bank (windows) |
| 5.22.2 | 2024-03-14 | `chassis()` type, assetTag, sku improved parsing (macOS) | | 5.22.2 | 2024-03-14 | `chassis()` type, assetTag, sku improved parsing (macOS) |
| 5.22.1 | 2024-03-12 | `wifiConnections()` patch for mac OS Sonome 14.4 (macOS) | | 5.22.1 | 2024-03-12 | `wifiConnections()` patch for mac OS Sonome 14.4 (macOS) |

View File

@ -57,6 +57,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<th scope="row">5.22.4</th>
<td>2024-03-16</td>
<td><span class="code">uuid()</span> improved parsing machine id (linux)</td>
</tr>
<tr> <tr>
<th scope="row">5.22.3</th> <th scope="row">5.22.3</th>
<td>2024-03-15</td> <td>2024-03-15</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo"> <img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div> <div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div> <div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.22.3</span></div> <div class="version">New Version: <span id="version">5.22.4</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button> <button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div> </div>
<div class="down"> <div class="down">

View File

@ -522,7 +522,7 @@ si.baseboard().then(data => console.log(data));</code></pre class="example">
<td>sku</td> <td>sku</td>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td>x</td>
<td>X</td> <td>X</td>
<td></td> <td></td>
<td>SKU number</td> <td>SKU number</td>
@ -537,11 +537,11 @@ si.chassis().then(data => console.log(data));</code></pre class="example">
{ {
manufacturer: 'Apple Inc.', manufacturer: 'Apple Inc.',
model: 'MacBookPro13,2', model: 'MacBookPro13,2',
type: '', type: 'Laptop',
version: '1.0', version: '1.0',
serial: 'C01xxxxxxxx', serial: 'C01xxxxxxxx',
assetTag: 'Mac-99878xxxx...', assetTag: 'Mac-99878xxxx...',
sku: '' sku: 'A1706'
}</pre> }</pre>
</tr> </tr>
</tbody> </tbody>

View File

@ -1122,8 +1122,8 @@ function uuid(callback) {
}); });
} }
if (_linux) { if (_linux) {
const cmd = `echo -n "os: "; cat /var/lib/dbus/machine-id 2> /dev/null; echo; const cmd = `echo -n "os: "; cat /var/lib/dbus/machine-id 2> /dev/null ||
echo -n "os: "; cat /etc/machine-id 2> /dev/null; echo; cat /etc/machine-id 2> /dev/null; echo;
echo -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;`; echo -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;`;
exec(cmd, function (error, stdout) { exec(cmd, function (error, stdout) {
const lines = stdout.toString().split('\n'); const lines = stdout.toString().split('\n');