Commit ca1250a8 authored by Daniel Schulte's avatar Daniel Schulte

Bugfix: Don't fail on longish mount points.

parent 05cd0cc8
...@@ -48,7 +48,8 @@ else ...@@ -48,7 +48,8 @@ else
# see where it is mounted # see where it is mounted
DEVFILE=${DEV#/dev/} DEVFILE=${DEV#/dev/}
MPOINT="$(dbus-send --print-reply=literal --system --dest=org.freedesktop.UDisks2 /org/freedesktop/UDisks2/block_devices/${DEVFILE} org.freedesktop.DBus.Properties.Get string:'org.freedesktop.UDisks2.Filesystem' string:'MountPoints' | tail -n +3 | tr -d "\ \]\[" | head -n 1 | xxd -r -p)" # MPOINT="$(dbus-send --print-reply=literal --system --dest=org.freedesktop.UDisks2 /org/freedesktop/UDisks2/block_devices/${DEVFILE} org.freedesktop.DBus.Properties.Get string:'org.freedesktop.UDisks2.Filesystem' string:'MountPoints' | tail -n +3 | tr -d "\ \]\[" | head -n 1 | xxd -r -p)"
MPOINT="$(udisksctl info --block-device "$DEV" | grep "MountPoints:" | tr -d ' ' | cut -d ':' -f2)"
echo "Der Stick it als '$MPOINT' gemountet" echo "Der Stick it als '$MPOINT' gemountet"
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment