Jerome Forissier | 1333db4 | 2017-01-18 10:20:51 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # /etc/init.d/optee |
| 4 | # |
| 5 | # Start/stop tee-supplicant (OP-TEE normal world daemon) |
| 6 | # |
| 7 | case "$1" in |
| 8 | start) |
| 9 | if [ -e /bin/tee-supplicant -a -e /dev/teepriv0 ]; then |
| 10 | echo "Starting tee-supplicant..." |
| 11 | tee-supplicant& |
| 12 | exit 0 |
| 13 | else |
| 14 | echo "tee-supplicant or TEE device not found" |
| 15 | exit 1 |
| 16 | fi |
| 17 | |
| 18 | ;; |
| 19 | stop) |
| 20 | killall tee-supplicant |
| 21 | ;; |
| 22 | status) |
| 23 | cat /dev/teepriv0 2>&1 | grep -q "Device or resource busy" || not="not " |
| 24 | echo "tee-supplicant is ${not}active" |
| 25 | ;; |
| 26 | esac |