Split non-ui functions in separate lib
[gregoa/zavai.git] / hooks / gsm
1 #!/bin/sh
2
3 case "$1" in
4         # At the start of zavai
5         status)
6         ;;
7         pre)
8                 exec om gsm power 1
9         ;;
10         post)
11                 exec om gsm power 0
12         ;;
13         # Run, blocking until the process ends
14         run)
15                 if [ -x /usr/bin/frameworkd ]
16                 then
17                         # Start frameworkd for GSM services only
18                         exec /usr/bin/frameworkd -s ogsmd > /tmp/zavai-frameworkd.log 2>&1
19                 else
20                         # For testing
21                         exec sleep 10
22                 fi
23         ;;
24         *)
25                 echo "Usage: $0 {run|status}." >&2
26                 exit 1
27         ;;
28 esac
29
30 exit 0