chore: df alternate to exclude memory (#7428)

DaanSelen committed Nov 14, 2025 at 15:16 UTC 3faace86d62f20e4a2a9795c0948e8a987937140
1 file changed +1 -1
agents/modules_meshcore/computer-identifiers.js
+1 -1
@@ -156,7 +156,7 @@ function linux_identifiers()
156 // Fetch storage volumes using df
157 child = require('child_process').execFile('/bin/sh', ['sh']);
158 child.stdout.str = ''; child.stdout.on('data', dataHandler);
159 - child.stdin.write('df -T | awk \'NR==1 || $1 ~ ".+"{print $3, $4, $5, $7, $2}\' | awk \'NR>1 {printf "{\\"size\\":\\"%s\\",\\"used\\":\\"%s\\",\\"available\\":\\"%s\\",\\"mount_point\\":\\"%s\\",\\"type\\":\\"%s\\"},", $1, $2, $3, $4, $5}\' | sed \'$ s/,$//\' | awk \'BEGIN {printf "["} {printf "%s", $0} END {printf "]"}\'\nexit\n');
159 + child.stdin.write('df -T -x tmpfs -x devtmpfs -x efivarfs | awk \'NR==1 || $1 ~ ".+"{print $3, $4, $5, $7, $2}\' | awk \'NR>1 {printf "{\\"size\\":\\"%s\\",\\"used\\":\\"%s\\",\\"available\\":\\"%s\\",\\"mount_point\\":\\"%s\\",\\"type\\":\\"%s\\"},", $1, $2, $3, $4, $5}\' | sed \'$ s/,$//\' | awk \'BEGIN {printf "["} {printf "%s", $0} END {printf "]"}\'\nexit\n');
160 child.waitExit();
161 try { ret.volumes = JSON.parse(child.stdout.str.trim()); } catch (xx) { }
162 child = null;