]> git.ozlabs.org Git - petitboot/blobdiff - utils/pb-sysinfo
discover/sysinfo: Add helper script to populate sysinfo identifiers
[petitboot] / utils / pb-sysinfo
diff --git a/utils/pb-sysinfo b/utils/pb-sysinfo
new file mode 100755 (executable)
index 0000000..bd2f0fe
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+case "$1" in
+'--type')
+       tr -d '\0' < /proc/device-tree/model
+       ;;
+'--id')
+       tr -d '\0' < /proc/device-tree/system-id
+       ;;
+esac