summaryrefslogtreecommitdiff
path: root/init.d.optee
blob: 6b7042c90a79423146555f53cdcb4c9b9465a205 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
#
# /etc/init.d/optee
#
# Start/stop tee-supplicant (OP-TEE normal world daemon)
#
case "$1" in
    start)
	if [ -e /bin/tee-supplicant -a -e /dev/teepriv0 ]; then
		echo "Starting tee-supplicant..."
		tee-supplicant&
		exit 0
	else
		echo "tee-supplicant or TEE device not found"
		exit 1
	fi

        ;;
    stop)
	killall tee-supplicant
	;;
    status)
	cat /dev/teepriv0 2>&1 | grep -q "Device or resource busy" || not="not "
	echo "tee-supplicant is ${not}active"
	;;
esac