NFS needs brackets around ipv6 addresses. Also: nfs_is_mounted needs to quote the variables. This becomes apparent when ipv6 addresses are used as then the address would otherwise be treated as a character class, causing the check to always fail.