[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#653305: partman-auto: Please provide hook when disk is too small for the expert recipe



Package: partman-auto
Version: 96
Severity: important
Tags: patch
User: debian-edu@lists.debian.org
Usertags: debian-edu

When installing a Debian Edu
main-server+workstation+thin-client-server on a virtual machine with
20 GB virtual disk, the partitioning recipe specified by Debian Edu is
silently ignored and the wrong partitioning setup is used (only one
partition for /).

We would like to be able to detect this in Debian Edu, and ask the
user how to continue, but the partman-auto code lack any hooks to
allow us to do this.

A hook like this might solve it.  Please include in a future version
of partman-auto.  Is this acceptable for Squeeze?

--- a/lib/recipes.sh
+++ b/lib/recipes.sh
@@ -333,6 +333,14 @@ choose_recipe () {
 		else
 			logger -t partman-auto \
 			"Available disk space ($free_size) too small for expert recipe ($(min_size)); skipping"
+			hookdir=/lib/partman/not-enough-space.d
+			if [ -d $hookdir ] ; then
+				for h in $hookdir/* ; do
+					if [ -x $h ] ; then
+						$h $recipe $free_size $min_size
+					fi
+				done
+			fi
 		fi
 	fi
 
-- 
Happy hacking
Petter Reinholdtsen



Reply to: