]> git.ozlabs.org Git - petitboot/blob - pb-sysinfo
001535a46fac14934e7fc5be2a4ccf86317de9f8
[petitboot] / pb-sysinfo
1 #!/bin/sh
2
3 case "$1" in
4 '--type')
5         tr -d '\0' < /proc/device-tree/model
6         ;;
7 '--id')
8         tr -d '\0' < /proc/device-tree/system-id
9         ;;
10 '--debug-enabled')
11         exec >/dev/null 2>&1
12         nvram --print-config=petitboot,debug? | grep -q true && exit 0
13         grep -Fq petitboot.debug /proc/cmdline && exit 0
14         exit 1
15         ;;
16 esac