Replace udisks-automount with udiskie.

master
Pierre Neidhardt 2019-11-02 11:54:46 +01:00
parent 0d2a45c7ba
commit bebe8ecbe4
2 changed files with 3 additions and 26 deletions

View File

@ -1,24 +0,0 @@
#!/bin/sh
if [ "$1" = "-h" ]; then
cat <<EOF>&2
Usage: ${0##*/}
Automatically mount external drives 'udisksctl'.
From https://wiki.archlinux.org/index.php/Udisks#udevadm_monitor.
EOF
exit
fi
pathtoname() {
udevadm info -p /sys/"$1" | awk -v FS== '/DEVNAME/ {print $2}'
}
stdbuf -oL -- udevadm monitor --udev -s block | while read -r -- _ _ event devpath _; do
if [ "$event" = add ]; then
devname=$(pathtoname "$devpath")
udisksctl mount --block-device "$devname" --no-user-interaction
fi
done

View File

@ -73,8 +73,9 @@ if [ "$(uname -o)" = "GNU/Linux" ] ; then
unset log_dmesg
## External device auto-mounting.
pkill udisks-automount
udisks-automount &
if command -v udiskie >/dev/null 2>&1; then
udiskie &
fi
fi
## Wine DLL overrides.