I have setup a container with smbd to host files on my home network.
And i have another container that need access to those files.
The way i want to do that is to cifs mount the share on the host and then use it as a mountpoint in the new container.
Everything works perfectly when i start everything manually.
Now i want everything to be able to start automaticly.
Since the container is started after the host i cant add it in the hosts fstab, so i came up with the idea that when container2 starts i just add a lxc.hook.pre-start to execute a script that mounts the share.
The script works when i run it from console on host and if i start the container with the hook, according to logs, the script is executed. But the mount is never mounted.
Are there restrictions to what an lxc hook is allowed to do?
And i have another container that need access to those files.
The way i want to do that is to cifs mount the share on the host and then use it as a mountpoint in the new container.
Everything works perfectly when i start everything manually.
Now i want everything to be able to start automaticly.
Since the container is started after the host i cant add it in the hosts fstab, so i came up with the idea that when container2 starts i just add a lxc.hook.pre-start to execute a script that mounts the share.
The script works when i run it from console on host and if i start the container with the hook, according to logs, the script is executed. But the mount is never mounted.
Are there restrictions to what an lxc hook is allowed to do?