add-sudo-to-mkdir (#761)
This commit is contained in:
parent
ebfaf811ac
commit
f52a90e564
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ share=$(smbclient -L "$srvname" -N | grep Disk | awk '{print $1}' | dmenu -i -p
|
||||||
share2mnt=//"$srvname".local/"$share"
|
share2mnt=//"$srvname".local/"$share"
|
||||||
|
|
||||||
sharemount() {
|
sharemount() {
|
||||||
mounted=$(mount -v | grep "$share2mnt") || ([ ! -d /mnt/"$share" ] && mkdir /mnt/"$share")
|
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="" /mnt/"$share" && notify-send "Netshare $share mounted" && exit 0
|
||||||
notify-send "Netshare $share already mounted"; exit 1
|
notify-send "Netshare $share already mounted"; exit 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue