Merge lp:~xnox/livecd-rootfs/drop-upstart-serial into lp:livecd-rootfs

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 1493
Proposed branch: lp:~xnox/livecd-rootfs/drop-upstart-serial
Merge into: lp:livecd-rootfs
Diff against target: 66 lines (+1/-41)
1 file modified
live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot (+1/-41)
To merge this branch: bzr merge lp:~xnox/livecd-rootfs/drop-upstart-serial
Reviewer Review Type Date Requested Status
Dan Watkins (community) Approve
Ubuntu Core Development Team Pending
Review via email: mp+328934@code.launchpad.net

Commit message

Drop creating serial consoles for upstart

Description of the change

Drop creating serial consoles for upstart

To post a comment you must log in.
Revision history for this message
Dan Watkins (oddbloke) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot'
2--- live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot 2016-04-14 18:06:33 +0000
3+++ live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot 2017-08-11 18:53:39 +0000
4@@ -20,36 +20,6 @@
5 #### COMMON architecture independent functions
6 arch=$(_xchroot "${rootd}" dpkg --print-architecture)
7
8-add_serial_console() {
9- condev=$1
10- idir="$rootd/etc/init"
11- cat << EOF > "${idir}/${condev}.conf"
12-# CONDEV - getty
13-#
14-# This service maintains a getty on CONDEV from the point the system is
15-# started until it is shut down again.
16-
17-start on stopped rc RUNLEVEL=[2345] and (
18- not-container or
19- container CONTAINER=lxc or
20- container CONTAINER=lxc-libvirt)
21-
22-stop on runlevel [!2345]
23-
24-pre-start script
25- # getty will not be started if the serial console is not present
26- stty -F /dev/CONDEV -a 2> /dev/null > /dev/null || { stop ; exit 0; }
27-end script
28-
29-respawn
30-script
31- exec /sbin/getty -L CONDEV 115200 vt102
32-end script
33-${CLOUD_IMG_STR}
34-EOF
35- sed -i "s/CONDEV/${condev}/g" "$idir/${condev}.conf"
36-}
37-
38 fake_cloud_init() {
39 # If the cloud does not provide a meta-data service this should be run
40 # This will setup a nocloud datasource.
41@@ -157,8 +127,6 @@
42 case $arch in
43 # ARM images are special
44 armhf|arm64)
45- echo "Configuring ARM Serial Port"
46- add_serial_console ttyAMA0
47 # Dirty hack because SUBARCH doesn't exist when running chroot hooks,
48 # and we don't want raspi2 images to depend on a cloud data source:
49 if _xchroot "${rootd}" dpkg -l linux-image-raspi2 2>/dev/null | grep -q '^.i'; then
50@@ -169,15 +137,7 @@
51
52 exit 0
53 ;;
54- ## Add ttyS0 for i386/amd64 for Trusty and newer
55- i386|amd64)
56- add_serial_console ttyS0
57- ;;
58- powerpc|ppc64el)
59- add_serial_console hvc0
60- exit 0
61- ;;
62- s390x)
63+ powerpc|ppc64el|s390x)
64 exit 0
65 ;;
66 esac

Subscribers

People subscribed via source and target branches