summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-07-04 01:31:24 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-07-04 01:31:24 +0200
commite99c4e4d9409bd1880035879d613769068854880 (patch)
treec9bd88f8ba0a0eb5bff51077d9d95989202987b6 /roles
parentmove usb install role to installer/debian/ (diff)
preseed/partman: add error handling @ not-enough space
Diffstat (limited to 'roles')
-rw-r--r--roles/installer/debian/preseed/templates/partman_early-command.sh.j212
1 files changed, 12 insertions, 0 deletions
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 <<EOF > /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