From 62f808def6fe5f082c685c696f62c794e23cf758 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 10 Sep 2021 19:14:14 +0200 Subject: ubuntu installer /swapfile vs /swap.img --- roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2 | 2 +- roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 | 2 +- roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'roles/installer') diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2 index 5768ad9c..3f31f66b 100644 --- a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2 +++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2 @@ -89,7 +89,7 @@ d-i finish-install/reboot_in_progress note d-i preseed/late_command string \ lvremove -f {{ host_name }}/dummy; \ - in-target bash -c "swapoff -a; sed -e '/^\/swapfile/d' -i /etc/fstab; rm -f /swapfile"; \ + in-target bash -c "swapoff -a; sed -e '/^\/swapfile/d' -e '/^\/swap\.img/d' -i /etc/fstab; rm -f /swapfile /swap.img"; \ in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \ in-target bash -c "env SUDO_FORCE_REMOVE=yes apt-get purge -y -q ubuntu-minimal sudo ubuntu-advantage-tools"; \ {% if debian_preseed_no_netplan %} diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 index 25c5f13d..f895a668 100644 --- a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 +++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 @@ -89,7 +89,7 @@ d-i finish-install/reboot_in_progress note d-i preseed/late_command string \ lvremove -f {{ host_name }}/dummy; \ - in-target bash -c "swapoff -a; sed -e '/^\/swapfile/d' -i /etc/fstab; rm -f /swapfile"; \ + in-target bash -c "swapoff -a; sed -e '/^\/swapfile/d' -e '/^\/swap\.img/d' -i /etc/fstab; rm -f /swapfile /swap.img"; \ in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \ in-target bash -c "env SUDO_FORCE_REMOVE=yes apt-get purge -y -q ubuntu-minimal sudo ubuntu-advantage-tools"; \ {% if debian_preseed_no_netplan %} diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 index 763a03cb..8b4538d5 100644 --- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 +++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 @@ -233,7 +233,7 @@ autoinstall: {% endfor %} late-commands: - - curtin in-target --target=/target -- swapoff -a; sed -e '/^\/swapfile/d' -i /etc/fstab; rm -f /swapfile + - curtin in-target --target=/target -- swapoff -a; sed -e '/^\/swapfile/d' -e '/^\/swap\.img/d' -i /etc/fstab; rm -f /swapfile /swap.img {% if ansible_port is defined %} - curtin in-target --target=/target -- sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config {% endif %} -- cgit v1.2.3