Description: Fix reboot of systemd >= 226
 Newer systemd always wants to create a /init.scope cgroup.  On reboot, lxc
 removes the old directory in cgroupfs, but lxcfs caches the direntry info
 for a second by default.  Drop the cache time to half a second, and add a
 reboot lxc hook to make lxc wait half a second before restarting.
 This patch combines two upstream commits.
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
Origin: Upstream
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lxcfs/+bug/1514690

Index: lxcfs-0.10/lxcfs.c
===================================================================
--- lxcfs-0.10.orig/lxcfs.c
+++ lxcfs-0.10/lxcfs.c
@@ -2900,7 +2900,7 @@ int main(int argc, char *argv[])
 		newargv[cnt++] = "-s";
 	newargv[cnt++] = "-f";
 	newargv[cnt++] = "-o";
-	newargv[cnt++] = "allow_other,direct_io";
+	newargv[cnt++] = "allow_other,direct_io,entry_timeout=0.5,attr_timeout=0.5";
 	newargv[cnt++] = argv[1];
 	newargv[cnt++] = NULL;
 
Index: lxcfs-0.10/configure.ac
===================================================================
--- lxcfs-0.10.orig/configure.ac
+++ lxcfs-0.10/configure.ac
@@ -12,6 +12,7 @@ AC_CONFIG_FILES([
 	share/Makefile
 	share/00-lxcfs.conf
 	share/lxc.mount.hook
+	share/lxc.reboot.hook
 	tests/Makefile ])
 
 AM_INIT_AUTOMAKE
Index: lxcfs-0.10/share/00-lxcfs.conf.in
===================================================================
--- lxcfs-0.10.orig/share/00-lxcfs.conf.in
+++ lxcfs-0.10/share/00-lxcfs.conf.in
@@ -1 +1,2 @@
 lxc.hook.mount = @LXCFSSHAREDIR@/lxc.mount.hook
+lxc.hook.post-stop = @LXCFSSHAREDIR@/lxc.reboot.hook
Index: lxcfs-0.10/share/Makefile.am
===================================================================
--- lxcfs-0.10.orig/share/Makefile.am
+++ lxcfs-0.10/share/Makefile.am
@@ -1,5 +1,5 @@
 lxccommondir=@LXCCONFDIR@
 lxcfssharedir=@LXCFSSHAREDIR@
 
-lxcfsshare_SCRIPTS = lxc.mount.hook
+lxcfsshare_SCRIPTS = lxc.mount.hook lxc.reboot.hook
 lxccommon_DATA = 00-lxcfs.conf
Index: lxcfs-0.10/share/lxc.reboot.hook.in
===================================================================
--- /dev/null
+++ lxcfs-0.10/share/lxc.reboot.hook.in
@@ -0,0 +1,3 @@
+#!/bin/sh -eu
+
+sleep 0.5s
