1
# vi: ts=4 noexpandtab syntax=sh
2
# Insert the Cosmic (18.10) Config
3
CLOUD_IMG_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process"
4
cat << EOF > ${mp}/etc/default/grub.d/50-cloudimg-settings.cfg
5
# Windows Azure specific grub settings
8
# Set the default commandline
9
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 earlyprintk=ttyS0 rootdelay=300"
11
# Set the grub console type
14
# Set the serial command
15
GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"
17
# Set the recordfail timeout
18
GRUB_RECORDFAIL_TIMEOUT=0
20
# Do not wait on grub prompt
24
# Add in the client keep alive
25
cat << EOF >> "${mp}/etc/ssh/sshd_config"
28
ClientAliveInterval 120
31
# Add the configuration for Cloud-init
32
cat << EOF > "${mp}/etc/cloud/cloud.cfg.d/90-azure.cfg"
36
- arches: [i386, amd64]
38
primary: http://archive.ubuntu.com/ubuntu
39
security: http://security.ubuntu.com/ubuntu
42
- http://azure.archive.ubuntu.com/ubuntu/
44
- arches: [armhf, armel, default]
46
primary: http://ports.ubuntu.com/ubuntu-ports
47
security: http://ports.ubuntu.com/ubuntu-ports
52
cat << EOF >> "${mp}/etc/initramfs-tools/modules"
54
# Need for slow boot times due to framebuffer
58
xchroot update-initramfs -u -k all