[Bug 600740] Re: Don't try to eject non-ejectable devices
Launchpad Bug Tracker
600740 at bugs.launchpad.net
Wed Dec 14 21:00:12 UTC 2011
This bug was fixed in the package casper - 1.295
---------------
casper (1.295) precise; urgency=low
* Convert keys from gconf to gsettings:
- 22gnome_panel_data: disable_lock_screen (LP: #610345)
- 15autologin: suppress-logout-menuitem (indicator)
* Syntax cleanup in debian/casper.init (replacing tabs by spaces)
* Base the hostname and username on the media name (LP: #290351)
* If udisks is present and considers a device has non-removable
then don't call eject and don't show the prompt. (LP: #600740)
-- Stephane Graber <stgraber at ubuntu.com> Wed, 14 Dec 2011 15:50:44 -0500
** Changed in: casper (Ubuntu)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to casper in Ubuntu.
https://bugs.launchpad.net/bugs/600740
Title:
Don't try to eject non-ejectable devices
Status in “casper” package in Ubuntu:
Fix Released
Bug description:
Binary package hint: casper
I was debugging a shutdown issue on a system where there was a ntfs
recovery partition on the disk. That is, a casper system and a
ubiquity install on, say, /dev/sda1.
During shutdown, the machine would just stop and not finish shutting
down. I didn't see any error or message why. It turns out that
casper was trying to tell me to eject the machine and press Enter.
But the message wasn't getting to the console (not sure why) and I
didn't know what it was waiting for.
The no-message issue is a separate bug, but not a useful one for me to
report because my setup is weird and I didn't debug it further.
But, I did add a workaround for why we were even trying to eject in
the first place. It seems to me that casper shouldn't try to eject a
non-ejectable device like my /dev/sda1. So I added the hacky solution
below. It should be possible to write something really sexy using
udisks or such, that asks if something is ejectable, right?
diff -Nru casper-1.236/debian/casper.init casper-1.236test1/debian/casper.init
--- casper-1.236/debian/casper.init 2010-04-12 15:57:54.000000000 +0100
+++ casper-1.236test1/debian/casper.init 2010-07-01 02:02:58.000000000 +0100
@@ -93,6 +93,12 @@
cache_path "$path"
done
+ cddev=$(mount | grep /cdrom | cut -d' ' -f1 | tr -d 0-9)
+ # ideally we'd check if device is non-ejectable, but for now just check if it's sda
+ if [ "$cddev" = "/dev/sda" ]; then
+ return
+ fi
+
eject -p -m /cdrom >/dev/null 2>&1
[ "$prompt" ] || return 0
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/600740/+subscriptions
More information about the foundations-bugs
mailing list