Skip to content

Commit

Permalink
uuid() improved parsing machine id (linux)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhildebrandt committed Mar 16, 2024
1 parent 1c6e0f0 commit 6a410cd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.

| 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.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) |
Expand Down
5 changes: 5 additions & 0 deletions docs/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ <h3>Full version history</h3>
</tr>
</thead>
<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>
<th scope="row">5.22.3</th>
<td>2024-03-15</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</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>
</div>
<div class="down">
Expand Down
6 changes: 3 additions & 3 deletions docs/system.html
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ <h5>Example</h5>
<td>sku</td>
<td></td>
<td></td>
<td></td>
<td>x</td>
<td>X</td>
<td></td>
<td>SKU number</td>
Expand All @@ -537,11 +537,11 @@ <h5>Example</h5>
{
manufacturer: 'Apple Inc.',
model: 'MacBookPro13,2',
type: '',
type: 'Laptop',
version: '1.0',
serial: 'C01xxxxxxxx',
assetTag: 'Mac-99878xxxx...',
sku: ''
sku: 'A1706'
}</pre>
</tr>
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions lib/osinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1122,8 +1122,8 @@ function uuid(callback) {
});
}
if (_linux) {
const cmd = `echo -n "os: "; cat /var/lib/dbus/machine-id 2> /dev/null; echo;
echo -n "os: "; cat /etc/machine-id 2> /dev/null; echo;
const cmd = `echo -n "os: "; cat /var/lib/dbus/machine-id 2> /dev/null ||
cat /etc/machine-id 2> /dev/null; echo;
echo -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;`;
exec(cmd, function (error, stdout) {
const lines = stdout.toString().split('\n');
Expand Down

0 comments on commit 6a410cd

Please sign in to comment.