You are not logged in.
I am using the script outlined in this wiki page https://wiki.archlinux.org/index.php/NF … dispatcher however it does not unmount the shares when disconnecting from the appropriate network. Mounting works just fine.
Any suggestions?
#!/bin/bash
# Find the connection UUID with "nmcli con show" in terminal.
# All NetworkManager connection types are supported: wireless, VPN, wired...
WANTED_CON_UUID="95aab9be-4f18-4956-8447-d9618dd3f6bb"
if [[ "$CONNECTION_UUID" == "$WANTED_CON_UUID" ]]; then
# Script parameter $1: NetworkManager connection name, not used
# Script parameter $2: dispatched event
case "$2" in
"up")
mount -a -t nfs4,nfs
;;
"pre-down");&
"vpn-pre-down")
umount -f -l -a -t nfs4,nfs >/dev/null
;;
esac
fi
Offline
Try change "pre-down" event to "down". This solve my problem with nfs unmounting.
Offline