Can mount location of cdroms be customized?

Chris Mohler cr33dog at gmail.com
Wed Sep 6 04:32:35 UTC 2006


> Personally, I'd like both at the same time, so if someone has a hint on
> that, chime in as well.
I didn't find much in the way of documentation on HAL, but I poked around in:
/usr/share/hal/scripts/hal-system-storage-mount

I decided a symlink to the cdburner would be adequate.  Then I added
the following (my bash is weak) before the last line:

<snip>-------------
# cr33 modified
MAKE_SYMLINK="true"

if [ "$MAKE_SYMLINK" == "true" ]; then
  SYMLINK_ROOT="/mnt"
  SYMLINK_NAME="cdburner"
  SYMLINK_DEVICE="/dev/hda"
  if [ "$HAL_PROP_BLOCK_DEVICE" == "$SYMLINK_DEVICE" ]; then
    SYMLINK_RESULT=$(ln -fsn "$MOUNT_ROOT/$MOUNTPOINT"
"$SYMLINK_ROOT/$SYMLINK_NAME" > /dev/null 2>&1)
    # if [ $? -ne 0 ]; then
    #   echo "Failed to create symlink - check modifications to " >&2
    #   echo "/usr/share/hal/scripts/hal-system-storage-mount" >&2
    # fi
  fi
fi
#end cr33
<snap>--------------

HAL should then create a symlink from the newly mounted /media/NAME to
/mnt/cdburner, as long as the block.device is /dev/hda.  Not elegant,
but enough to point a drive in ~/.wine to /mnt/cdburner.  You'll have
to edit SYMLINK_ROOT, SYMLINK_NAME, SYMLINK_DEVIC...

I commented out the status check (OK, my bash is terrible) because I
haven't figured out where HAL logs events or messages.  Chose /mnt for
the symlink - seems like there's never anything in there with FC5.

Passing an option to HAL to create symlinks that correspond to the
block device *seems* like a good idea...

Thoughts wecome.

Chris




More information about the fedora-list mailing list