#!/bin/bash
# AQ
# 20120913

for device in /dev/disk/by-id/usb*part*; do
    devname=`echo $device | sed "s/^.*.\///"`
    sync
    udisks --unmount $device
    if [ $? -eq 0 ] ; then
	zenity --info --text="Device $devname unmounted"
    else
	zenity --error --text="Error unmounting $devname"
    fi
done
