You are not logged in.
I know this is not the best code in the world, but I thought someone else might want it.
udvm automounts drives using udisks for people like me who like thunar but want to get rid of HAL.
Run it as a user.
#!/bin/bash
# UDisks log
ulog=$(mktemp -u /tmp/udvm.fifo.XXXXXX)
mkfifo "${ulog}"
trap "rm -f ${ulog}" EXIT SIGINT SIGTERM
# Start monitoring
(udisks --monitor >"${ulog}") &
udisks_pid=$!
while ps ${udisks_pid} &>/dev/null && [[ -e "${ulog}" ]]; do
devices=()
read -t 2 output < "${ulog}"
devices=($(echo "${output}"| grep '^added:' | sed s:.*/::g))
# Mount all 'real' devices
for ((i=0; i < ${#devices[@]}; i++)); do
if [[ $(udisks --show-info "/dev/${devices[i]}" \
| sed -n 's/ *usage: *//p') == "filesystem" ]]; then
udisks --mount "/dev/${devices[i]}" >/dev/null && \
echo "mounted: /dev/${devices[i]}"
fi
done
done
kill ${udisks_pid}
exit
Offline
Is it better than the first rule here:
http://wiki.archlinux.org/index.php/Udev
Offline
It might work similar to the same as the second rule, but not the first.
This needs to be run as a separate daemon, so if the rule works fine for you, stick with it. I made this because I have other users that use gnome, so they will have the drives being mounted twice if they are logged in.
Offline