|
|
|
@ -36,29 +36,28 @@ if test -n "$udi"; then
|
|
|
|
|
dcop kded mediamanager unmount "$udi" >/dev/null 2>&1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Checking for stuff in the PATH is ugly with sh.
|
|
|
|
|
# I guess this is the reason for making this a kde app...
|
|
|
|
|
OS=`uname -s`
|
|
|
|
|
case "$OS" in
|
|
|
|
|
# Checking for stuff in the PATH is ugly with sh.
|
|
|
|
|
# I guess this is the reason for making this a kde app...
|
|
|
|
|
OS=`uname -s`
|
|
|
|
|
case "$OS" in
|
|
|
|
|
OpenBSD)
|
|
|
|
|
cdio -f $1 eject >/dev/null 2>&1
|
|
|
|
|
cdio -f $device eject #>/dev/null 2>&1
|
|
|
|
|
;;
|
|
|
|
|
*BSD)
|
|
|
|
|
dev=`echo $1 | sed -E -e 's#/dev/##' -e 's/([0-9])./\1/'`
|
|
|
|
|
cdcontrol -f $dev eject >/dev/null 2>&1
|
|
|
|
|
dev=`echo $device | sed -E -e 's#/dev/##' -e 's/([0-9])./\1/'`
|
|
|
|
|
cdcontrol -f $dev eject #>/dev/null 2>&1
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
# Warning, it has to be either eject 2.0.x or >=2.1.5
|
|
|
|
|
# Otherwise it doesn't work as expected (it requires a
|
|
|
|
|
# fstab entry for no reason).
|
|
|
|
|
eject $1 >/dev/null 2>&1
|
|
|
|
|
eject -v $device #>/dev/null 2>&1
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
if test $? -eq 0; then
|
|
|
|
|
# dcop kdesktop default refreshIcons
|
|
|
|
|
esac
|
|
|
|
|
if test $? -eq 0; then
|
|
|
|
|
#dcop kdesktop default refreshIcons
|
|
|
|
|
exit 0
|
|
|
|
|
elif test $quiet -eq 0; then
|
|
|
|
|
kdialog --title "KDE Eject" --error "Eject $1 failed!"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
elif test $quiet -eq 0; then
|
|
|
|
|
kdialog --title "KDE Eject" --error "Eject $device failed!"
|
|
|
|
|
fi
|
|
|
|
|
exit 1
|
|
|
|
|