Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- Z_MNT="/mnt/z";
- # WSL2 Preview localhost Workaround
- Z_HOST=$(cat /etc/resolv.conf | grep nameserver | awk ' { print $2 } ')
- Z_SHARE="//${Z_HOST}/Z"
- if [ $(grep -c "${Z_MNT}" /proc/mounts) -eq 0 ]; then
- echo " + Mounting ${Z_SHARE}..."
- sudo mount -t cifs -o credentials=/home/zefie/.config/.cifscred,uid=1000,gid=1000,iocharset=utf8 "${Z_SHARE}" "${Z_MNT}"
- else
- echo " - Unmounting ${Z_SHARE}..."
- sudo umount "${Z_MNT}"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement