/usr/bin/herepositioning-license-accepted is in ubuntu-location-provider-here 0.1+15.10.20150601.3-0ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #!/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") [<user name>]" >&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
|