@@ -0,0 +1,34 @@
2+# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
4+# Copyright (C) 2011,2013 Canonical Ltd
5+# Author: Michael Terry <michael.terry@canonical.com>
7+# This program is free software: you can redistribute it and/or modify it under
8+# the terms of the GNU General Public License as published by the Free Software
9+# Foundation, version 3 of the License.
11+# See http://www.gnu.org/copyleft/gpl.html the full text of the license.
13+# This wrapper merely ensures that init and friends live only as long as this
14+# script does. Otherwise, it's very easy for some processes to not notice that
15+# the session died. We could try to do this in-process, but we want to do this
16+# cleanup even if the greeter aborts.
18+trap cleanup TERM EXIT
23+ # Kill upstart and indicators
24+ killall -u lightdm /sbin/init
25+ if [ -n "$CMD_PID" ]; then