~ubuntu-branches/ubuntu/trusty/telephony-service/trusty-proposed

« back to all changes in this revision

Viewing changes to tools/ofono-setup

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Michael Terry, Gustavo Pichorim Boiko
  • Date: 2014-03-19 02:49:40 UTC
  • mfrom: (1.1.20)
  • Revision ID: package-import@ubuntu.com-20140319024940-mdtcdwo6ef4pudh7
Tags: 0.1+14.04.20140319-0ubuntu1
[ Michael Terry ]
* Add support for sharing contact info of incoming texts with the
  greeter.
* Consolidate ringtone code and greeter code so that the service can
  listen to which user is selected in the greeter, and use their
  ringtone.

[ Gustavo Pichorim Boiko ]
* Make it possible to handle multiple telepathy accounts.
* Cleanup the build deps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
dconf write /org/gnome/empathy/use-conn false 2>&1 > /dev/null
5
5
 
6
6
# check if there is a tp-ofono account already
 
7
# for now assume that if there is at least one account, the system is properly configured.
7
8
mc-tool show ofono/ofono/account0 2>&1 > /dev/null
8
9
 
9
10
# if there is not, create one and enable it
10
11
if [ $? -eq 1 ]; then
11
 
        echo 'creating ofono/ofono/account0'
12
 
        mc-tool add ofono/ofono account0
13
 
        echo 'enabling ofono/ofono/account0'
14
 
        mc-tool enable ofono/ofono/account0
15
 
        mc-tool auto-connect ofono/ofono/account0
 
12
        # get the modems from ofono
 
13
        MODEMS=`/usr/share/ofono/scripts/list-modems | grep --binary-files=text "^\[" | sed 's,^\[ \(.*\) \],\1,g'`
 
14
        INDEX=0
 
15
 
 
16
        # and for each modem found create a telepathy account
 
17
        for modem in $MODEMS; do
 
18
            ACCOUNT="account$INDEX"
 
19
            echo "creating ofono/ofono/$ACCOUNT"
 
20
            mc-tool add ofono/ofono $ACCOUNT string:modem-objpath=$modem
 
21
            echo "enabling ofono/ofono/$ACCOUNT"
 
22
            mc-tool enable ofono/ofono/$ACCOUNT
 
23
            mc-tool auto-connect ofono/ofono/$ACCOUNT
 
24
            INDEX=$((INDEX+1))
 
25
        done
16
26
fi
17
27
 
18
 
echo 'ofono/ofono/account0 initialized'
 
28
echo 'ofono accounts initialized'