Started tracking my linux preferences.

This commit is contained in:
Jorge Vásquez Pérez
2020-10-07 10:04:51 -07:00
parent ed1908699f
commit c46338f7f8
7 changed files with 56 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
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