Introduce new hook /lib/partman/not-enough-space.d/ called if there is not enough space available to use the provided recipe. This make it possible for Debian derivatives to abort the installation if it is going to fail before the partitioning take place (Closes: #653305).
Petter Reinholdtsen
10 years ago
|
0 |
partman-auto (108) UNRELEASED; urgency=low
|
|
1 |
|
|
2 |
[ Petter Reinholdtsen ]
|
|
3 |
|
|
4 |
* Introduce new hook /lib/partman/not-enough-space.d/ called if
|
|
5 |
there is not enough space available to use the provided recipe.
|
|
6 |
This make it possible for Debian derivatives to abort the
|
|
7 |
installation if it is going to fail before the partitioning take
|
|
8 |
place (Closes: #653305).
|
|
9 |
|
|
10 |
-- Petter Reinholdtsen <[email protected]> Mon, 15 Jul 2013 12:00:51 +0200
|
|
11 |
|
0 | 12 |
partman-auto (108) unstable; urgency=low
|
1 | 13 |
|
2 | 14 |
[ Dmitrijs Ledkovs ]
|
357 | 357 |
if [ ! -z "$RET" ] && [ -e "$RET" ]; then
|
358 | 358 |
recipe="$RET"
|
359 | 359 |
decode_recipe $recipe $type
|
360 | |
if [ $(min_size) -le $free_size ]; then
|
|
360 |
min_size=$(min_size)
|
|
361 |
if [ $min_size -le $free_size ]; then
|
361 | 362 |
return 0
|
362 | 363 |
else
|
363 | 364 |
logger -t partman-auto \
|
364 | |
"Available disk space ($free_size) too small for expert recipe ($(min_size)); skipping"
|
|
365 |
"Available disk space ($free_size) too small for expert recipe ($min_size); skipping"
|
|
366 |
hookdir=/lib/partman/not-enough-space.d
|
|
367 |
if [ -d $hookdir ] ; then
|
|
368 |
for h in $hookdir/* ; do
|
|
369 |
if [ -x $h ] ; then
|
|
370 |
$h $recipe $free_size $min_size
|
|
371 |
fi
|
|
372 |
done
|
|
373 |
fi
|
365 | 374 |
fi
|
366 | 375 |
fi
|
367 | 376 |
|