From 8e20e4b1691c33d7ceb8c034af14a182412b86a5 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 2 Feb 2016 20:33:52 -0800 Subject: [PATCH] Refactor some non-idiomatic architecture handling in live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot --- debian/changelog | 7 +++ .../ubuntu-cpc/hooks/999-cpc-fixes.chroot | 45 +++++++++---------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/debian/changelog b/debian/changelog index 05c9ea4f..3328142d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.375) UNRELEASED; urgency=medium + + * Refactor some non-idiomatic architecture handling in + live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot + + -- Steve Langasek Tue, 02 Feb 2016 20:33:23 -0800 + livecd-rootfs (2.374) xenial; urgency=medium [ Michael Vogt ] diff --git a/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot b/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot index 535aaa31..63ed7d5b 100755 --- a/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot +++ b/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot @@ -126,30 +126,29 @@ fi #### END COMMON ARCH FUNCTIONS -if [ "$arch" = "ppc64el" ]; then - add_serial_console hvc0 - exit 0 -fi - -# ARM images are special -if [[ "$arch" =~ (arm|arm64|aarch64) ]]; then - - echo "Configuring ARM Serial Port" - add_serial_console ttyAMA0 - - echo "Image architecture is ARM. Existing vmbuilder-fixups" - - exit 0 -fi - -if [ "$arch" = "s390x" ]; then - exit 0 -fi -## Add ttyS0 for i386/amd64 for Trusty and newer -if [ "$arch" = "i386" -o "$arch" = "amd64" ]; then - add_serial_console ttyS0 -fi +case $arch in + # ARM images are special + armhf|arm64) + echo "Configuring ARM Serial Port" + add_serial_console ttyAMA0 + + echo "Image architecture is ARM. Existing vmbuilder-fixups" + + exit 0 + ;; + ## Add ttyS0 for i386/amd64 for Trusty and newer + i386|amd64) + add_serial_console ttyS0 + ;; + ppc64el) + add_serial_console hvc0 + exit 0 + ;; + s390x) + exit 0 + ;; +esac psuedo_grub_probe() { cat <<"PSUEDO_GRUB_PROBE"