summaryrefslogtreecommitdiff
path: root/scripts/live
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-05-01 13:31:18 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:48:09 +0100
commitc967ebfc4e43fb16a0c2c140c66900712be95ab7 (patch)
tree74a8a142d7d6ceadcd9c4cb23ee3819fd8739336 /scripts/live
parent65721717c4e37f6cec9e66f2ac355746490338ab (diff)
downloadlive-boot-c967ebfc4e43fb16a0c2c140c66900712be95ab7.tar.gz
live-boot-c967ebfc4e43fb16a0c2c140c66900712be95ab7.zip
Merging casper 1.216.
Diffstat (limited to 'scripts/live')
-rwxr-xr-xscripts/live29
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/live b/scripts/live
index 6f4f5c1..26a6a46 100755
--- a/scripts/live
+++ b/scripts/live
@@ -1885,6 +1885,28 @@ mountroot ()
mount -n -o bind /dev "${rootmnt}/dev"
fi
+ # Open up two fifo's fd's for debconf-communicate to use. Speeds up
+ # the live-initramfs process considerably.
+ log_begin_msg "Creating debconf-communicate fifo mechanism"
+ mkfifo /tmp/debconf-in.fifo
+ mkfifo /tmp/debconf-out.fifo
+
+ chroot /root debconf-communicate -fnoninteractive live-initramfs > /tmp/debconf-out.fifo < /tmp/debconf-in.fifo &
+
+ # Save the PID so it can be killed later.
+ DEBCONF_COMMUNICATE_PID="$!"
+
+ if [ ! -p /tmp/debconf-in.fifo ] || [ ! -p /tmp/debconf-out.fifo ]
+ then
+ log_warning_msg "failed to setup debconf-communicate channel"
+ fi
+ log_end_msg
+
+ # Order matters!
+ # These file descriptors must stay open until we're finished with
+ # debconf-communicate.
+ exec 4</tmp/debconf-out.fifo 3>/tmp/debconf-in.fifo
+
maybe_break live-bottom
log_begin_msg "Running /scripts/live-bottom\n"
@@ -1896,6 +1918,13 @@ mountroot ()
umount "${rootmnt}/dev"
fi
+ # Kill the debconf-communicate instance and close fd's associated with·
+ # debconf-communicate.
+ kill $DEBCONF_COMMUNICATE_PID
+ exec 3>&- 4<&-
+ rm -f /tmp/debconf-in.fifo
+ rm -f /tmp/debconf-out.fifo
+
exec 1>&6 6>&-
exec 2>&7 7>&-
kill ${tailpid}