networkInterfaces(), chassis() fixed two more issues
This commit is contained in:
parent
b3326a08e3
commit
860dec2260
@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
||||
|
||||
| Version | Date | Comment |
|
||||
| -------------- | -------------- | -------- |
|
||||
| 4.0.3 | 2019-02-03 | `networkInterfaces(), chassis()` fixed two more issues |
|
||||
| 4.0.2 | 2019-02-03 | `networkInterfaces(), chassis()` fixed smaller issues |
|
||||
| 4.0.1 | 2019-02-02 | updated docs |
|
||||
| 4.0.0 | 2019-02-02 | new major version |
|
||||
|
||||
@ -55,6 +55,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">4.0.3</th>
|
||||
<td>2019-02-03</td>
|
||||
<td><span class="code">networkInterfaces(), chassis()</span> fixed two more issues</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">4.0.2</th>
|
||||
<td>2019-02-03</td>
|
||||
|
||||
@ -335,7 +335,7 @@ function networkInterfaces(callback) {
|
||||
echo -n "speed: "; cat /sys/class/net/${iface}/speed 2>/dev/null; echo;
|
||||
echo -n "tx_queue_len: "; cat /sys/class/net/${iface}/tx_queue_len 2>/dev/null; echo;
|
||||
echo -n "type: "; cat /sys/class/net/${iface}/type 2>/dev/null; echo;
|
||||
echo -n "wireless: "; cat /proc/net/wireless 2>/dev/null \| grep ${iface};
|
||||
echo -n "wireless: "; cat /proc/net/wireless 2>/dev/null \| grep ${iface}; echo
|
||||
echo -n "wirelessspeed: "; iw dev ${iface} link 2>&1 \| grep bitrate; echo;`;
|
||||
let lines = [];
|
||||
try {
|
||||
|
||||
@ -493,7 +493,8 @@ function chassis(callback) {
|
||||
exec(cmd, function (error, stdout) {
|
||||
let lines = stdout.toString().split('\n');
|
||||
result.manufacturer = util.getValue(lines, 'chassis_vendor');
|
||||
result.type = util.getValue(lines, 'chassis_type');
|
||||
const ctype = parseInt(util.getValue(lines, 'chassis_type').replace(/\D/g, ''));
|
||||
result.type = (ctype && !isNaN(ctype) && ctype < chassisTypes.length) ? chassisTypes[ctype - 1] : '';
|
||||
result.version = util.getValue(lines, 'chassis_version');
|
||||
result.serial = util.getValue(lines, 'chassis_serial');
|
||||
result.assetTag = util.getValue(lines, 'chassis_asset_tag');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user