mount exfat for rw (#812)

This commit is contained in:
Petar Tomić 2020-09-08 15:23:10 +02:00 committed by GitHub
parent 3dc859933b
commit b8d15d5278
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,6 +25,7 @@ mountusb() { \
partitiontype="$(lsblk -no "fstype" "$chosen")" partitiontype="$(lsblk -no "fstype" "$chosen")"
case "$partitiontype" in case "$partitiontype" in
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;; "vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
"exfat") sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)";;
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";; *) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";;
esac esac
notify-send "💻 USB mounting" "$chosen mounted to $mp." notify-send "💻 USB mounting" "$chosen mounted to $mp."