dnschneid/crouton — pull request #699 by smibarber (2014-03-13 01:23:34+00:00)
Title: Launch systemd-logind if available

This fixes the polkit issues in saucy+ (see #457).

Like the Ubuntu `systemd-logind.conf`, this sets up the basic systemd directories/cgroups to get logind in a runnable state. systemd itself is NOT running.

Some issues to address before merging:
* Prevent logind from running if the chroot has systemd 205 or later. logind in systemd 205 depends on systemd running as PID 1 to handle all cgroup functionality. The most reliable method for this is probably parsing out the version from `/sbin/init`. `systemd-logind` doesn't print version information itself...
* I'm not exactly pleased with the way that `systemd-logind` is being launched right now. It doesn't fork like a traditional daemon, though, so it can't be launched as easily as `dbus-daemon`.
* Since this now rbinds all of `/sys`, hardcoding the umounts under `/sys` might not be a good idea.