all i need is to include the mount in Fstab of the host to make it permanent.
vzctl set 101 --features "nfs:on" --save
vzctl restart 101
#! /bin/sh
### BEGIN INIT INFO
### END INIT INFO
. /lib/init/vars.sh
. /lib/lsb/init-functions
case "$1" in
start)
mount -t nfs 10.4.3.87:/home/shares /home/nfs
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
/etc/init.d/nfs-common restart
umount /home/nfs
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
update-rc.d store.sh defaults 95 95
Ty 4.- create a script that invoques the mount and umount, like this:
We use essential cookies to make this site work, and optional cookies to enhance your experience.