summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmenumountcifs
diff options
context:
space:
mode:
authorPetar Tomić <tomicp@gmail.com>2020-07-28 13:54:49 +0200
committerGitHub <noreply@github.com>2020-07-28 07:54:49 -0400
commit11b04f4788af8fb13db2794dcd0635a6bd54c19e (patch)
tree91aca3d72b86679707127ef47b1d29acfe3fa452 /.local/bin/dmenumountcifs
parent536ec1a09b59ddc44036f81cc29a69a3f3cce5a9 (diff)
downloadeibhear-11b04f4788af8fb13db2794dcd0635a6bd54c19e.tar.gz
eibhear-11b04f4788af8fb13db2794dcd0635a6bd54c19e.tar.zst
eibhear-11b04f4788af8fb13db2794dcd0635a6bd54c19e.zip
Mount CIFS share with read/write permissions (#776)
Diffstat (limited to '.local/bin/dmenumountcifs')
-rwxr-xr-x.local/bin/dmenumountcifs4
1 files changed, 2 insertions, 2 deletions
diff --git a/.local/bin/dmenumountcifs b/.local/bin/dmenumountcifs
index 99be72f..46c2b57 100755
--- a/.local/bin/dmenumountcifs
+++ b/.local/bin/dmenumountcifs
@@ -1,5 +1,5 @@
#!/bin/sh
-# Gives a dmenu prompt to mount unmounted local NAS shares.
+# Gives a dmenu prompt to mount unmounted local NAS shares for read/write.
# Requirements - "%wheel ALL=(ALL) NOPASSWD: ALL"
#
# Browse for mDNS/DNS-SD services using the Avahi daemon...
@@ -12,7 +12,7 @@ share2mnt=//"$srvname".local/"$share"
sharemount() {
mounted=$(mount -v | grep "$share2mnt") || ([ ! -d /mnt/"$share" ] && sudo mkdir /mnt/"$share")
- [ -z "$mounted" ] && sudo mount -t cifs "$share2mnt" -o user=nobody,password="" /mnt/"$share" && notify-send "Netshare $share mounted" && exit 0
+ [ -z "$mounted" ] && sudo mount -t cifs "$share2mnt" -o user=nobody,password="",noperm /mnt/"$share" && notify-send "Netshare $share mounted" && exit 0
notify-send "Netshare $share already mounted"; exit 1
}