Bug#528480: live-installer does not let d-i to eject cdrom
Chris Lamb wrote:
> Tested patch attached.
Hm. My mailer generated an invalid mail.. attaching again.
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby@debian.org
`-
>From 1a5e0405660a7aed91ec2b65debaecc4a9675055 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Sat, 16 May 2009 01:48:12 +0100
Subject: [PATCH] Detach loop devices and unmount filesystems so that CD-ROM ejection in finish-install doesn't fail. (Closes: #528480)
---
packages/live-installer/debian/changelog | 7 +++++++
packages/live-installer/debian/postinst | 3 +++
packages/live-installer/support/dir | 3 +++
packages/live-installer/support/ext2 | 4 ++++
packages/live-installer/support/ext3 | 4 ++++
packages/live-installer/support/squashfs | 4 ++++
6 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/packages/live-installer/debian/changelog b/packages/live-installer/debian/changelog
index d47f716..816e735 100644
--- a/packages/live-installer/debian/changelog
+++ b/packages/live-installer/debian/changelog
@@ -1,3 +1,10 @@
+live-installer (10) UNRELEASED; urgency=low
+
+ * Detach loop devices and unmount filesystems so that CD-ROM ejection in
+ finish-install doesn't fail. (Closes: #528480)
+
+ -- Chris Lamb <lamby@debian.org> Sat, 16 May 2009 01:25:14 +0100
+
live-installer (9) unstable; urgency=low
* busybox-udeb now supports tar creation, so don't use tar from the live
diff --git a/packages/live-installer/debian/postinst b/packages/live-installer/debian/postinst
index bbcb2c4..abe12e6 100755
--- a/packages/live-installer/debian/postinst
+++ b/packages/live-installer/debian/postinst
@@ -56,6 +56,9 @@ install_live_system () {
)
exec 0>&4
IFS=$OLD_IFS
+
+ chdir /
+ eval ${SUPPORT}_teardown
done
if [ ${PLACE_FOUND} -eq 0 ]; then
diff --git a/packages/live-installer/support/dir b/packages/live-installer/support/dir
index e4a3ddb..f595b8e 100644
--- a/packages/live-installer/support/dir
+++ b/packages/live-installer/support/dir
@@ -7,6 +7,9 @@ dir_prepare() {
cd $place
}
+dir_teardown() {
+}
+
dir_count() {
echo `find . | wc -l`
}
diff --git a/packages/live-installer/support/ext2 b/packages/live-installer/support/ext2
index 35e2b2e..0679586 100644
--- a/packages/live-installer/support/ext2
+++ b/packages/live-installer/support/ext2
@@ -16,6 +16,10 @@ ext2_prepare() {
cd /mnt
}
+ext2_teardown() {
+ umount -d /mnt > /dev/null 2>&1 || true
+}
+
ext2_count() {
echo `print-inodes /mnt`
}
diff --git a/packages/live-installer/support/ext3 b/packages/live-installer/support/ext3
index d912677..4e23ddd 100644
--- a/packages/live-installer/support/ext3
+++ b/packages/live-installer/support/ext3
@@ -16,6 +16,10 @@ ext3_prepare() {
cd /mnt
}
+ext3_teardown() {
+ umount -d /mnt > /dev/null 2>&1 || true
+}
+
ext3_count() {
echo `print-inodes /mnt`
}
diff --git a/packages/live-installer/support/squashfs b/packages/live-installer/support/squashfs
index db73e8a..b8fd9f0 100644
--- a/packages/live-installer/support/squashfs
+++ b/packages/live-installer/support/squashfs
@@ -17,6 +17,10 @@ squashfs_prepare() {
cd /mnt
}
+squashfs_teardown() {
+ umount -d /mnt > /dev/null 2>&1 || true
+}
+
squashfs_count() {
echo `print-inodes /mnt`
}
--
1.6.3
Reply to: