From 88b62ca52468e1093919eab3392178f13d8e982a Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Fri, 22 May 2020 16:27:24 +0900 Subject: [PATCH] fix: [2004] More fixes to make 20.04 work --- http/user-data | 13 ++++++++++++- scripts/extend.sh | 5 +++++ scripts/interfaces.sh | 26 -------------------------- 3 files changed, 17 insertions(+), 27 deletions(-) create mode 100644 scripts/extend.sh delete mode 100644 scripts/interfaces.sh diff --git a/http/user-data b/http/user-data index 65f545e..9195a11 100644 --- a/http/user-data +++ b/http/user-data @@ -1,10 +1,17 @@ #cloud-config autoinstall: version: 1 + apt: + geoip: true + preserve_sources_list: true identity: hostname: misp-vm username: 'misp' password: '$6$Zw5jtOmRPBqrzFT7$st/15FZrcYhlt7bgv70ILUsPfzEuFumiZF.CdXJ9VdVXXLHI4WIjJ6MS/5g3410L1ogCO5O7B7ro.XEFZ2P0o0' + keyboard: + layout: us + variant: '' + locale: en_US network: network: version: 2 @@ -13,8 +20,12 @@ autoinstall: dhcp4: true dhcp-identifier: mac ssh: + allow-pw: true + authorized-keys: [] install-server: true + storage: + layout: + name: lvm late-commands: - - touch /target/etc/cloud/cloud-init.disabled - sed -i 's/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/' /target/etc/dhcp/dhclient.conf - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' diff --git a/scripts/extend.sh b/scripts/extend.sh new file mode 100644 index 0000000..8e83294 --- /dev/null +++ b/scripts/extend.sh @@ -0,0 +1,5 @@ +#! /usr/bin/env bash + +echo "--- Extending disks " +lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv +resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv diff --git a/scripts/interfaces.sh b/scripts/interfaces.sh deleted file mode 100644 index dc3a723..0000000 --- a/scripts/interfaces.sh +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/env bash - -## This file is AUTOGENERATED. -## /!\ Do NOT Change the contents of the file. -## To generate it you need a copy of the main MISP repo. -## As a quick reference, you cat generate with xsnippet: -# $ xsnippet /tmp/ $PATH_TO_MISP/docs/generic/ethX.md -# $ cp /tmp/interfaces.sh . - -echo "--- Using old style name (ethX) for interfaces" -sed -r 's/^(GRUB_CMDLINE_LINUX=).*/\1\"net\.ifnames=0\ biosdevname=0\"/' /etc/default/grub | sudo tee /etc/default/grub > /dev/null - -# install ifupdown since ubuntu 18.04 -sudo apt update -sudo apt install ifupdown -qqy - -# enable eth0 -echo "--- Configuring eth0" - -cat >> /etc/network/interfaces << EOF -# The primary network interface -auto eth0 -iface eth0 inet dhcp -EOF - -update-grub > /dev/null 2>&1