summaryrefslogtreecommitdiffstats
path: root/utils/pb-sysinfo
blob: 001535a46fac14934e7fc5be2a4ccf86317de9f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

case "$1" in
'--type')
	tr -d '\0' < /proc/device-tree/model
	;;
'--id')
	tr -d '\0' < /proc/device-tree/system-id
	;;
'--debug-enabled')
	exec >/dev/null 2>&1
	nvram --print-config=petitboot,debug? | grep -q true && exit 0
	grep -Fq petitboot.debug /proc/cmdline && exit 0
	exit 1
	;;
esac
OpenPOWER on IntegriCloud