mount drives with user's ownership

This commit is contained in:
Luke Smith 2023-02-17 10:17:35 -05:00
parent 335c1bc8af
commit 185ac25e52
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252

View file

@ -59,7 +59,7 @@ case "$chosen" in
chosen="${chosen%% *}" chosen="${chosen%% *}"
chosen="${chosen:1}" # This is a bashism. chosen="${chosen:1}" # This is a bashism.
getmount getmount
sudo -A mount "$chosen" "$mp" sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)"
notify-send "💾Drive Mounted." "$chosen mounted to $mp." notify-send "💾Drive Mounted." "$chosen mounted to $mp."
;; ;;
@ -78,7 +78,7 @@ case "$chosen" in
test -b "/dev/mapper/usb$num" test -b "/dev/mapper/usb$num"
getmount getmount
sudo -A mount "/dev/mapper/usb$num" "$mp" sudo -A mount "/dev/mapper/usb$num" "$mp" -o uid="$(id -u)",gid="$(id -g)"
notify-send "🔓Decrypted drive Mounted." "$chosen decrypted and mounted to $mp." notify-send "🔓Decrypted drive Mounted." "$chosen decrypted and mounted to $mp."
;; ;;