summaryrefslogtreecommitdiffstats
path: root/opensuse/core/tdebase/kdeeject.diff
diff options
context:
space:
mode:
authorRobert Xu <robxu9@gmail.com>2011-11-10 18:04:39 -0500
committerRobert Xu <robxu9@gmail.com>2011-11-10 18:04:39 -0500
commit21fcfa3348213aa87f0e3aef62ca4720c6d31cb7 (patch)
tree2cfb64c59322628e613ed0895e3c3694d3abe6bd /opensuse/core/tdebase/kdeeject.diff
parent8667643bff14a60d8571c599efd3e48bed3e3b12 (diff)
downloadtde-packaging-21fcfa3348213aa87f0e3aef62ca4720c6d31cb7.tar.gz
tde-packaging-21fcfa3348213aa87f0e3aef62ca4720c6d31cb7.zip
initial commit to suse branch: eclipse integration
Diffstat (limited to 'opensuse/core/tdebase/kdeeject.diff')
-rw-r--r--opensuse/core/tdebase/kdeeject.diff58
1 files changed, 58 insertions, 0 deletions
diff --git a/opensuse/core/tdebase/kdeeject.diff b/opensuse/core/tdebase/kdeeject.diff
new file mode 100644
index 000000000..d22e67fb6
--- /dev/null
+++ b/opensuse/core/tdebase/kdeeject.diff
@@ -0,0 +1,58 @@
+Index: kdeeject/kdeeject
+===================================================================
+--- kdeeject/kdeeject.orig
++++ kdeeject/kdeeject
+@@ -4,12 +4,38 @@
+ #
+ # Copyright GPL v2 by David Faure <david@mandrakesoft.com>
+ #
+-if test $# -ge 1 -a "$1" != "--help"; then
+- quiet=0
+- if test "$1" = "-q"; then
+- quiet=1
+- shift
+- fi
++quiet=0
++if test "$1" = "-q"; then
++ quiet=1
++ shift
++fi
++
++if test "$1" = "--help"; then
++ echo "Usage: $0 <name> where name is a device or a mountpoint."
++ exit 0
++fi
++
++if test -z "$1"; then
++ for dev in /dev/cdrom /dev/dvd /dev/dvdram /dev/cdrecorder; do
++ if test -e $dev; then
++ lp=`readlink $dev`
++ if test -n "$lp"; then
++ device=/dev/$lp
++ else
++ device=$dev
++ fi
++ break
++ fi
++ done
++else
++ device=$1
++fi
++
++udi=`dcop kded mediamanager properties $device 2>/dev/null | head -n 1 `
++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`
+@@ -34,7 +60,5 @@ if test $# -ge 1 -a "$1" != "--help"; th
+ elif test $quiet -eq 0; then
+ kdialog --title "KDE Eject" --error "Eject $1 failed!"
+ fi
+-else
+- kdialog --title "KDE Eject" --msgbox "Usage: $0 <name> where name is a device or a mountpoint."
+-fi
++
+ exit 1