From 7c3fd0276531eff050cf56a8ce352c0f8ec650e5 Mon Sep 17 00:00:00 2001
From: Dimitri John Ledkov <xnox@ubuntu.com>
Date: Fri, 2 Dec 2016 15:50:43 +0000
Subject: [PATCH] Make partman-swapfile not ask any questions, nor show
 progress.

For ubiquity, we want it non-interactive, as this is done in the
background whilst user selects country/timezone, etc.
---
 finish.d/create_swapfile | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/finish.d/create_swapfile b/finish.d/create_swapfile
index 046a990..f1f97f0 100755
--- a/finish.d/create_swapfile
+++ b/finish.d/create_swapfile
@@ -61,9 +61,6 @@ if [ -f /target/swapfile ]; then
 fi
 
 
-db_input medium partman-swapfile/size || true
-db_input medium partman-swapfile/percentage || true
-db_go || true
 db_get partman-swapfile/size
 max_size=$RET
 db_get partman-swapfile/percentage
@@ -89,21 +86,14 @@ then
     return 0
 fi
 
-db_progress START 0 5 partman/text/formatting
-db_progress INFO partman-swapfile/progress_swap_formatting
-db_progress SET 1
 if type fallocate >/dev/null 2>&1 && $fallocatesupport; then
     log-output -t partman-swapfile --pass-stdout fallocate -l ${size}KiB /target/swapfile
 else
     log-output -t partman-swapfile --pass-stdout dd if=/dev/zero of=/target/swapfile bs=1024 count=$size
 fi
-db_progress SET 2
 chmod 600 /target/swapfile
-db_progress SET 3
 log-output -t partman-swapfile --pass-stdout mkswap /target/swapfile >/dev/null
 sync
-db_progress SET 4
 enable_swap
-db_progress STOP
 
 return 0
-- 
2.7.4

