Package: pbbuttonsd
Version: 0.7.9-2
Tags: patch

Hi!

In [1] we got a report that pbbuttons' default approach of eject does
not work everywhere. Apparently '/usr/sbin/eject' does a better job
for that, so attached patch uses eject and only falls back to umount
if eject fails. Ubuntu has used that patch for years without any
negative report.

Thanks for considering,

Martin

[1] https://bugs.launchpad.net/ubuntu/+source/pbbuttonsd/+bug/22209
-- 
Martin Pitt              http://www.piware.de
Ubuntu Developer   http://www.ubuntulinux.org
Debian Developer        http://www.debian.org
--- pbbuttonsd-0.7.9.orig/src/module_cdrom.c
+++ pbbuttonsd-0.7.9/src/module_cdrom.c
@@ -314,7 +314,11 @@
 
 	singletag_to_clients(CHANGEVALUE, TAG_EJECTCD, 0); /* busy */
 	if ((mp = cdrom_getmountpoint(base->cdromdev)))
-		err = call_script ("/bin/umount %.30s", mp);
+	{
+		err = call_script ("/usr/bin/eject %.30s", mp);
+		if (err)
+		    err = call_script ("/bin/umount %.30s", mp);
+	}
 
 #if defined(DEBUG) && CDROM
 	printf ("mp=%s, err=%d, %s (%d)\n", mp, err, strerror(errno), errno);

Attachment: signature.asc
Description: Digital signature

Reply via email to