|
|
# Warning, it has to be either eject 2.0.x or >=2.1.5 | # Warning, it has to be either eject 2.0.x or >=2.1.5 |
# Otherwise it doesn't work as expected (it requires a | # Otherwise it doesn't work as expected (it requires a |
# fstab entry for no reason). | # fstab entry for no reason). |
eject $1 >/dev/null 2>&1 |
#eject $1 >/dev/null 2>&1 |
|
BLOCK_UDI=$(dcop kded mediamanager properties "$1" | head -1) |
|
[ -n "$BLOCK_UDI" ] || kdialog --title "KDE Eject" --error "Can't find UDI for URL $1" |
|
dbus-send --system --dest=org.freedesktop.Hal "$BLOCK_UDI" org.freedesktop.Hal.Device.Volume.Eject array:string:"" >/dev/null 2>&1 |
;; | ;; |
esac | esac |
if test $? -eq 0; then | if test $? -eq 0; then |