use hal-lock to prevent automount of make-live-device.sh target

Bug #508203 reported by Aymeric Mansoux
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bouilloncube
Won't Fix
High
Claude Heiland-Allen

Bug Description

If make-live-device.sh is ran from XFCE hal and co will automount the target device as they are created, turning the whole process in a mess. At the moment the script umount the partitions (thx claude) but the most elegant way would be use hal-locking during the whole process so we are not interrupted at all.

see: http://tuxradar.com/answers/706 (thx dan)

Revision history for this message
Claude Heiland-Allen (claudiusmaximus) wrote :

from hal-lock man page:

--8<--
NOTES
       This program is only useful for launching software that doesn’t use HAL at all (since such software launched using hal-lock would be locked out itself); for example a partition table editor part-foo may use wrapper script like this
       hal-lock --interface org.freedesktop.Hal.Device.Storage --exclusive --run /path/to/part-foo-program
--8<--

Thinking, it should be possible for the script to do something clever and get hal-lock to call it itself with an additional argument like --I-certify-that-I-have-a-lock-on-hal-device-storage - would be maybe nicer than having to have two script files, but the logic would be hairier.

I will run some tests to see if hal-lock actually does do what is required.

Changed in bouilloncube:
importance: Undecided → High
status: New → In Progress
assignee: nobody → Claude Heiland-Allen (claudiusmaximus)
Revision history for this message
Claude Heiland-Allen (claudiusmaximus) wrote :

tested briefly from an xterm in a running liveUSB generating another liveUSB using an .iso file from the local hard drive, some small "not quite perfect" bits still:

1. there is a graphical popup with a close button saying live-rw could not be mounted due to being locked
2. when the script is finished the main partition is mounted on /media/puredyne and a window opens in the xfce4 file manager

see attached bzr diff

Seems to be a tricky problem, see also: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/blosxom/ubuntu/2008-04-12-desktop-automount-pain.html

Revision history for this message
Claude Heiland-Allen (claudiusmaximus) wrote :

It seems that in Lucid hald might not be always be running so hal-lock might fail (?), so yet more logic is probably needed to detect hald and only then run hal-lock.

----8<----
ubiquity (2.1.7) lucid; urgency=low
  ...
  * Only run hal-lock if hald is actually running due to changes in
    hal 0.5.14-0ubuntu2.
  ...
----8<----

http://www.ubuntu.com/testing/lucid/beta1#HAL%20removal "hald removed from boot process."

Changed in bouilloncube:
milestone: none → 10.04
Revision history for this message
Aymeric Mansoux (aymeric) wrote :

our script seems to be mostly used by us, as people tend to use this GUI stuff, forgot the name. We can live without user-friendliness, marking as won't fix.

Changed in bouilloncube:
status: In Progress → Incomplete
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.