source: live-build/trunk/fuentes/debian/patches/upstart-not-in-bootstrap @ 900

Last change on this file since 900 was 900, checked in by kbut, 4 years ago

add original source

File size: 1.0 KB
Line 
1Description: Fix lb_chroot_upstart to work when upstart's not in bootstrap
2Author: Adam Conrad <adconrad@ubuntu.com>
3Bug-Ubuntu: https://bugs.launchpad.net/bugs/1477051
4
5--- live-build-3.0~a57.orig/scripts/build/lb_chroot_upstart
6+++ live-build-3.0~a57/scripts/build/lb_chroot_upstart
7@@ -27,12 +27,6 @@ Set_defaults
8 # Requiring stage file
9 Require_stagefile .build/config .build/bootstrap
10 
11-# Check if system uses upstart
12-if [ ! -e chroot/sbin/initctl ]
13-then
14-       exit 0
15-fi
16-
17 case "${1}" in
18        install)
19                Echo_message "Configuring file /sbin/initctl"
20@@ -49,6 +43,8 @@ case "${1}" in
21                # Create custom initctl file
22                Chroot chroot dpkg-divert --rename --quiet --add /sbin/initctl
23 
24+               # Only create stub if we actually diverted something
25+               if [ -e chroot/sbin/initctl.distrib ]; then
26 cat > chroot/sbin/initctl << EOF
27 #!/bin/sh
28 echo "All runlevel operations denied by policy" >&2
29@@ -56,6 +52,7 @@ exit 101
30 EOF
31 
32                chmod 0755 chroot/sbin/initctl
33+               fi
34 
35                # Creating stage file
36                Create_stagefile .build/chroot_upstart
Note: See TracBrowser for help on using the repository browser.