ubuntu-location-provider-here-0.1+15.10.20150601.3/ 0000755 0000153 0000161 00000000000 12533115334 021740 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/ 0000755 0000153 0000161 00000000000 12533115334 022513 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/dbus-1/ 0000755 0000153 0000161 00000000000 12533115334 023606 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/dbus-1/system.d/ 0000755 0000153 0000161 00000000000 12533115334 025354 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/dbus-1/system.d/com.here.slpgwd.conf 0000644 0000153 0000161 00000001205 12533115235 031220 0 ustar pbuser pbgroup 0000000 0000000
ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/dbus-1/system.d/com.ubuntu.espoo.Service.conf0000644 0000153 0000161 00000001056 12533115235 033047 0 ustar pbuser pbgroup 0000000 0000000
ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/dbus-1/system.d/com.here.posclientd.conf 0000644 0000153 0000161 00000001736 12533115235 032075 0 ustar pbuser pbgroup 0000000 0000000
ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/init/ 0000755 0000153 0000161 00000000000 12533115334 023456 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/init/ubuntu-espoo-service.conf 0000644 0000153 0000161 00000001541 12533115235 030431 0 ustar pbuser pbgroup 0000000 0000000 description "Ubuntu Espoo Position Provider"
# this requires DBus and is useless without posclientd; should cope with DBus
# services restarting though
start on started dbus and started ubuntu-location-provider-here-posclientd
stop on stopping dbus
respawn
env BASE="/custom/vendor/here/location-provider"
pre-start script
if ! [ -x "$BASE/bin/@DEB_HOST_MULTIARCH@/ubuntu-espoo-service" ]; then
echo "HERE binaries not found; disabling" >&2
stop
fi
# XXX need to move to session bus to avoid hardcoding this ~phablet test
if ! herepositioning-license-accepted; then
echo "HERE license not accepted; disabling" >&2
stop
fi
end script
script
LD_LIBRARY_PATH="$BASE/lib/@DEB_HOST_MULTIARCH@"
export LD_LIBRARY_PATH
exec "$BASE/bin/@DEB_HOST_MULTIARCH@/ubuntu-espoo-service" --bus system
end script
././@LongLink 0000000 0000000 0000000 00000000146 00000000000 011216 L ustar 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/init/ubuntu-location-provider-here-slpgwd.conf ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/init/ubuntu-location-provider-here-slpgwd.con0000644 0000153 0000161 00000002474 12533115235 033365 0 ustar pbuser pbgroup 0000000 0000000 description "Nokia Here positioning services"
# this requires DBus and consumes data from oFono and NM; should cope with DBus
# services restarting though
start on started dbus and started ofono and started network-manager
stop on stopping dbus
respawn
console log
env BASE="/custom/vendor/here/location-provider"
env STORAGE="/userdata/system-data/var/lib/ubuntu-location-provider-here"
env SCRIPT="/usr/share/ubuntu-location-provider-here/set-enviroment.sh"
pre-start script
if ! [ -x "$BASE/bin/@DEB_HOST_MULTIARCH@/slpgwd" ]; then
echo "HERE binaries not found; disabling" >&2
stop
fi
# XXX need to move to session bus to avoid hardcoding this ~phablet test
if ! herepositioning-license-accepted; then
echo "HERE license not accepted; disabling" >&2
stop
fi
end script
script
. /usr/share/ubuntu-location-provider-here/functions
# set the env variables
if [ "$(getprop custom.location.report_imei)" = "true" ]; then
setup_here_ofono_env
else
here_dummy_ofono_env
fi
setup_here_props
setup_here_device_id
mkdir -p "$STORAGE"
LD_LIBRARY_PATH="$BASE/lib/@DEB_HOST_MULTIARCH@"
export LD_LIBRARY_PATH
exec "$BASE/bin/@DEB_HOST_MULTIARCH@/slpgwd" \
--preinst-dir "$BASE/share" --storage-dir "$STORAGE"
end script
././@LongLink 0000000 0000000 0000000 00000000154 00000000000 011215 L ustar 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/init/ubuntu-location-provider-here-after-wizard.conf ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/init/ubuntu-location-provider-here-after-wiza0000644 0000153 0000161 00000002552 12533115243 033354 0 ustar pbuser pbgroup 0000000 0000000 description "Start HERE positioning and Location Service provider after wizard completes"
# this task will start after greeter completes; ideally it should start when
# the license property is set and for this we could check
# /var/lib/AccountsService/users/phablet but that's kind of a private path and
# it might get updated fairly often (e.g. it contains a sound level)
# XXX need to move to session bus to avoid hardcoding this ~phablet test
start on file FILE=/home/phablet/.config/ubuntu-system-settings/wizard-has-run EVENT=create
task
script
# HACK: the location-service gets busted when we restart it and the other processes are not
# in the correct order. We stop location, start all the other services in the correct order
# and start location again
# XXX ugly, we need to restart location-service to pickup the now available provider :-/
if [ -f "/home/phablet/.config/ubuntu-system-settings/wizard-has-run-and-location-job-too" ]; then
stop; exit 0
fi
sleep 5
stop ubuntu-location-provider-here-posclientd || true
stop ubuntu-location-provider-here-slpgwd || true
stop ubuntu-location-service || true
start ubuntu-location-provider-here-slpgwd || true
start ubuntu-location-service
touch /home/phablet/.config/ubuntu-system-settings/wizard-has-run-and-location-job-too
stop; exit 0
end script
././@LongLink 0000000 0000000 0000000 00000000152 00000000000 011213 L ustar 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/init/ubuntu-location-provider-here-posclientd.conf ubuntu-location-provider-here-0.1+15.10.20150601.3/etc/init/ubuntu-location-provider-here-posclientd0000644 0000153 0000161 00000002371 12533115235 033447 0 ustar pbuser pbgroup 0000000 0000000 description "Nokia Here positioning services"
# this requires DBus and is useless without slpgwd; should cope with DBus
# services restarting though
start on started dbus and started ubuntu-location-provider-here-slpgwd
stop on stopping dbus
respawn
console log
env BASE="/custom/vendor/here/location-provider"
env STORAGE="/userdata/system-data/var/lib/ubuntu-location-provider-here"
pre-start script
if ! [ -x "$BASE/bin/@DEB_HOST_MULTIARCH@/posclientd" ]; then
echo "HERE binaries not found; disabling" >&2
stop
fi
# XXX need to move to session bus to avoid hardcoding this ~phablet test
if ! herepositioning-license-accepted; then
echo "HERE license not accepted; disabling" >&2
stop
fi
end script
script
. /usr/share/ubuntu-location-provider-here/functions
# set the env variables
if [ "$(getprop custom.location.report_imei)" = "true" ]; then
setup_here_ofono_env
else
here_dummy_ofono_env
fi
setup_here_props
setup_here_device_id
mkdir -p "$STORAGE"
LD_LIBRARY_PATH="$BASE/lib/@DEB_HOST_MULTIARCH@"
export LD_LIBRARY_PATH
exec "$BASE/bin/@DEB_HOST_MULTIARCH@/posclientd" \
--preinst-dir "$BASE/share" --storage-dir "$STORAGE"
end script
ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/ 0000755 0000153 0000161 00000000000 12533115334 022551 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/ 0000755 0000153 0000161 00000000000 12533115334 023653 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/ubuntu-location-provider-here/ 0000755 0000153 0000161 00000000000 12533115334 031554 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/ubuntu-location-provider-here/functions0000644 0000153 0000161 00000007231 12533115235 033512 0 ustar pbuser pbgroup 0000000 0000000 #!/bin/sh
set -e
die() {
echo "$@" >&2
exit 1
}
dbus_do() {
local dest="$1"
shift
dbus-send --system --print-reply --dest="$dest" "$@"
}
ofono_dbus() {
dbus_do "org.ofono" "$@"
}
ofa_dbus() {
dbus_do "org.freedesktop.Accounts" "$@"
}
# stdin: DBus reply, stdout: DBus object paths, one per line
dbus_object_paths() {
sed -n 's/^ *object path "\(.*\)"$/\1/p'
}
# DBus object paths of oFono modems, one per line; bails out if oFono isn't
# available
get_modems() {
local modems
if ! modems="$(ofono_dbus / org.ofono.Manager.GetModems)"; then
return 1
fi
# convert to /ril_0 etc. object paths
echo "$modems" | dbus_object_paths
}
# extracts value of a property from a DBus reply; variant is the type
# e.g. string or boolean
get_dbus_prop() {
local data="$1"
local variant="$2"
local name="$3"
echo "$data" |
grep -A1 "^ *string \"$name\"$" |
sed -n "s/^ *variant \\+$variant //p"
}
# extracts value of a string property from a DBus reply
get_string() {
local data="$1"
local name="$2"
get_dbus_prop "$data" "string" "$name" | sed 's/^"\(.*\)"$/\1/'
}
setup_here_device_id() {
local data
if ! data="$(dbus_do com.ubuntu.WhoopsiePreferences /com/ubuntu/WhoopsiePreferences com.ubuntu.WhoopsiePreferences.GetIdentifier)"; then
die "Couldn't get Whoopsie identifier"
fi
HERE_UNIQUE_DEVICE_ID="$(echo "$data" | sed -n 's/^ *string "\(.*\)"$/\1/p')"
export HERE_UNIQUE_DEVICE_ID
}
# sets HERE env vars which depend only on properties
# TODO set sensible values for systems without getprop
setup_here_props() {
HERE_DEVICE_TERMINAL_MODEL="$(getprop ro.product.model)"
HERE_DEVICE_MANUFACTURER="$(getprop ro.product.manufacturer)"
HERE_DEVICE_FIRMWARE_VERSION="$(getprop ro.build.version.incremental)"
export HERE_DEVICE_TERMINAL_MODEL HERE_DEVICE_MANUFACTURER HERE_DEVICE_FIRMWARE_VERSION
}
# sets HERE env vars which depend on oFono and a modem + SIM being ready
setup_here_ofono_env() {
local modems
local modem
local data
local serial
if ! modems="$(get_modems)"; then
die "Couldn't get modems from oFono"
fi
if [ -z "$modems" ]; then
die "No modem found"
fi
for modem in "$modems"; do
# get properties of this modem
if ! data="$(ofono_dbus "$modem" org.ofono.Modem.GetProperties)"; then
echo "Couldn't get properties of modem $modem; skipping" >&2
continue
fi
# extract Serial
if ! serial=$(get_string "$data" "Serial"); then
echo "Couldn't get Serial for modem $modem; skipping" >&2
continue
fi
HERE_IMEI_FRAGMENT="$(echo "$serial" | grep -o '[0-9]*' | cut -c 1-8)"
export HERE_IMEI_FRAGMENT
# get properties of this SIM
if ! data="$(ofono_dbus "$modem" org.ofono.SimManager.GetProperties)"; then
echo "Couldn't get properties of SIM $modem; skipping" >&2
continue
fi
if ! HERE_SIM_MCC=$(get_string "$data" "MobileCountryCode"); then
echo "Couldn't find MobileCountryCode for SIM $modem; skipping" >&2
continue
fi
if ! HERE_SIM_MNC=$(get_string "$data" "MobileNetworkCode"); then
echo "Couldn't find MobileNetworkCode for SIM $modem; skipping" >&2
continue
fi
export HERE_SIM_MCC HERE_SIM_MNC
return 0
done
die "No modem/SIM had all required properties; giving up"
}
here_dummy_ofono_env() {
HERE_IMEI_FRAGMENT="00000000"
export HERE_IMEI_FRAGMENT
HERE_SIM_MCC=""
HERE_SIM_MNC=""
export HERE_SIM_MCC HERE_SIM_MNC
}
ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/dbus-1/ 0000755 0000153 0000161 00000000000 12533115334 024746 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/dbus-1/interfaces/ 0000755 0000153 0000161 00000000000 12533115334 027071 5 ustar pbuser pbgroup 0000000 0000000 ././@LongLink 0000000 0000000 0000000 00000000206 00000000000 011213 L ustar 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/dbus-1/interfaces/com.ubuntu.location.providers.here.AccountsService.xml ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/dbus-1/interfaces/com.ubuntu.location.p0000644 0000153 0000161 00000001561 12533115235 033163 0 ustar pbuser pbgroup 0000000 0000000
ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/accountsservice/ 0000755 0000153 0000161 00000000000 12533115334 027053 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/accountsservice/interfaces/ 0000755 0000153 0000161 00000000000 12533115334 031176 5 ustar pbuser pbgroup 0000000 0000000 ././@LongLink 0000000 0000000 0000000 00000000217 00000000000 011215 L ustar 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/accountsservice/interfaces/com.ubuntu.location.providers.here.AccountsService.xml ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/accountsservice/interfaces/com.ubuntu.l0000777 0000153 0000161 00000000000 12533115334 052000 2../../dbus-1/interfaces/com.ubuntu.location.providers.here.AccountsService.xml ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/doc/ 0000755 0000153 0000161 00000000000 12533115334 024420 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/doc/herepositioning/ 0000755 0000153 0000161 00000000000 12533115334 027626 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/share/doc/herepositioning/copyright 0000644 0000153 0000161 00000017570 12533115235 031573 0 ustar pbuser pbgroup 0000000 0000000 Files: *
Copyright: 2012-2014 HERE Global B.V and/or its affiliated companies.
License: HERE-Global-B.V-Proprietary
Copyright (C) 2012-2014 HERE Global B.V and/or its affiliated companies.
All rights reserved.
This software, including documentation, is protected by copyright controlled
by HERE Global B.V. All rights are reserved. Copying, including reproducing,
storing, adapting or translating, any or all of this material requires the
prior written consent of HERE Global B.V. This material also contains
confidential information which may not be disclosed to others without prior
written consent of HERE Global B.V.
This software uses open source components, which licenses are included below.
----
This product contains software developed by Jean-loup Gailly and Mark Adler.
----
Copyright (c) 1997
Christian Michelsen Research AS
Advanced Computing
Fantoftvegen 38, 5036 BERGEN, Norway
http://www.cmr.no
Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear
in supporting documentation. Christian Michelsen Research AS makes no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.
----
Copyright (c) 1996, 1997 Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear
in supporting documentation. Silicon Graphics makes no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.
----
Copyright (c) 1994 Hewlett-Packard Company
Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear
in supporting documentation. Hewlett-Packard Company makes no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.
----
Copyright (c) 1990-2005 Info-ZIP. All rights reserved.
For the purposes of this copyright and license, "Info-ZIP" is
defined as the following set of individuals:
Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel
Dubois, Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman,
Chris Herborth, Dirk Haase, Greg Hartwig, Robert Heath, Jonathan
Hudson, Paul Kienitz, David Kirschbaum, Johnny Lee, Onno van der
Linden, Igor Mandrichenko, Steve P. Miller, Sergio Monesi, Keith
Owens, George Petrov, Greg Roelofs, Kai Uwe Rommel, Steve
Salisbury, Dave Smith, Steven M. Schweda, Christian Spieler,
Cosmin Truta, Antoine Verheijen, Paul von Behren, Rich Wales,
Mike White
This software is provided "as is," without warranty of any kind,
express or implied. In no event shall Info-ZIP or its contributors
be held liable for any direct, indirect, incidental, special or
consequential damages arising out of the use of or inability to
use this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. Redistributions of source code must retain the above
copyright notice, definition, disclaimer, and this list of
conditions.
2. Redistributions in binary form (compiled executables) must
reproduce the above copyright notice, definition, disclaimer, and
this list of conditions in documentation and/or other materials
provided with the distribution. The sole exception to this
condition is redistribution of a standard UnZipSFX binary
(including SFXWiz) as part of a self-extracting archive; that is
permitted without inclusion of this license, as long as the
normal SFX banner has not been removed from the binary or disabled.
3. Altered versions--including, but not limited to, ports to
new operating systems, existing ports with new graphical
interfaces, and dynamic, shared, or static library versions--must
be plainly marked as such and must not be misrepresented as
being the original source. Such altered versions also must not
be misrepresented as being Info-ZIP releases--including, but not
limited to, labeling of the altered versions with the names
"Info-ZIP" (or any variation thereof, including, but not limited
to, different capitalizations), "Pocket UnZip," "WiZ" or "MacZip"
without the explicit permission of Info-ZIP. Such altered versions
are further prohibited from misrepresentative use of the Zip-Bugs
or Info-ZIP e-mail addresses or of the Info-ZIP URL(s).
4. Info-ZIP retains the right to use the names "Info-ZIP,"
"Zip," "UnZip," "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip,"
and "MacZip" for its own source and binary releases.
----
Copyright 2003, 2005-2010, 2012, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/bin/ 0000755 0000153 0000161 00000000000 12533115334 023321 5 ustar pbuser pbgroup 0000000 0000000 ubuntu-location-provider-here-0.1+15.10.20150601.3/usr/bin/herepositioning-license-accepted 0000755 0000153 0000161 00000003314 12533115235 031644 0 ustar pbuser pbgroup 0000000 0000000 #!/bin/sh
# herepositioning-license-accepted - succeeds iif HERE license was accepted
# Copyright (C) 2014 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# On Debian systems, the full text of the GNU Lesser General Public
# License version 3 can be found in the file
# `/usr/share/common-licenses/LGPL-3'.
set -e
. /usr/share/ubuntu-location-provider-here/functions
usage() {
echo "Usage: $(basename "$0") []" >&2
}
if [ $# -gt 1 ]; then
usage
exit 1
fi
# FIXME phablet is hardcoded as the default user; username should be mandatory
USERNAME="$1"
USERNAME="${USERNAME:-phablet}"
# NB: this triggers DBus activation in case Account Service wasn't running
if ! user="$(ofa_dbus /org/freedesktop/Accounts \
org.freedesktop.Accounts.FindUserByName \
"string:$USERNAME")"; then
die "Couldn't find user $USERNAME in AccountService"
fi
userpath="$(echo "$user" | dbus_object_paths)"
if ! data="$(ofa_dbus "$userpath" \
org.freedesktop.DBus.Properties.GetAll \
string:com.ubuntu.location.providers.here.AccountsService)"; then
die "Couldn't read HERE AccountService properties for user path $userpath"
fi
if [ "$(get_dbus_prop "$data" "boolean" "LicenseAccepted")" = "true" ]; then
exit 0
fi
exit 1