blob: d6d6d370811bf5950eabad51f1dc117a893b22ed [file] [log] [blame]
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Mark that the user has logged in"
author "chromium-os-dev@chromium.org"
# We're a task to ensure that the state change is fully marked
# before session manager calls this step done.
start on start-user-session
task
script
# TODO(sleffler) move to where cryptohome is created
if mkdir --mode=700 ~chronos/flimflam 2>/dev/null; then
dbus-send --system --dest=org.chromium.flimflam --print-reply / \
org.chromium.flimflam.Manager.CreateProfile 'string:~chronos/flimflam' ||
logger -t "$UPSTART_JOB" "Failed to create ~chronos/flimflam profile"
fi
# Push user's network profile
# NB: must quote ~chronos; don't want it expanded
dbus-send --system --dest=org.chromium.flimflam --print-reply / \
org.chromium.flimflam.Manager.PushProfile 'string:~chronos/flimflam' ||
logger -t "$UPSTART_JOB" "Failed to push ~chronos/flimflam profile"
# The "logged-in" file is used by ACPI events to behave
# appropriately. The state directory is created earlier in
# session startup.
touch /var/run/state/logged-in
end script