From e99c4e4d9409bd1880035879d613769068854880 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 4 Jul 2020 01:31:24 +0200 Subject: preseed/partman: add error handling @ not-enough space --- .../debian/preseed/templates/partman_early-command.sh.j2 | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'roles') diff --git a/roles/installer/debian/preseed/templates/partman_early-command.sh.j2 b/roles/installer/debian/preseed/templates/partman_early-command.sh.j2 index 9c720e92..f13290e4 100644 --- a/roles/installer/debian/preseed/templates/partman_early-command.sh.j2 +++ b/roles/installer/debian/preseed/templates/partman_early-command.sh.j2 @@ -31,3 +31,15 @@ debconf-set grub-installer/bootdev "$disks" ## https://unix.stackexchange.com/questions/510445/install-grub-bootloader-dynamically-to-multiple-disks . /usr/share/debconf/confmodule db_fset grub-installer/bootdev seen true + +mkdir -p /lib/partman/not-enough-space.d/ +cat < /lib/partman/not-enough-space.d/00-ansible +#!/bin/sh + +. /usr/share/debconf/confmodule +db_input critical partman-auto/autopartitioning_failed || true +db_go || true + +exit 1 +EOF +chmod +x /lib/partman/not-enough-space.d/00-ansible -- cgit v1.2.3