Description: Fix upstart handling in a mixed upstart/systemd world
   * debian/patches/upstart-user-sessions: Only do the upstart initctl
     dance if initcl was in the debootstrapped system, so we don't end
     up deleting the initctl from the desktop package set install pass
Author: Adam Conrad <adconrad@ubuntu.com>
Last-Update: 2015-03-10

--- live-build-3.0~a57.orig/scripts/build/lb_chroot_upstart
+++ live-build-3.0~a57/scripts/build/lb_chroot_upstart
@@ -44,7 +44,6 @@ case "${1}" in
 		then
 			# Save initctl file
 			mv chroot/sbin/initctl chroot/sbin/initctl.orig
-		fi
 
 		# Create initctl file
 cat > chroot/sbin/initctl << EOF
@@ -54,6 +53,7 @@ exit 101
 EOF
 
 		chmod 0755 chroot/sbin/initctl
+		fi
 
 		# Creating stage file
 		Create_stagefile .build/chroot_upstart
@@ -72,9 +72,6 @@ EOF
 		then
 			# Restore initctl file
 			mv chroot/sbin/initctl.orig chroot/sbin/initctl
-		else
-			# Remove initctl file
-			rm -f chroot/sbin/initctl
 		fi
 
 		# Removing stage file
