How to start script when the VE starts [message #40667] |
Fri, 17 September 2010 10:12 |
open vau zett
Messages: 2 Registered: September 2010 Location: Germany
|
Junior Member |
|
|
Hello,
Has anybody an indea of how to start a shell-script when a VE starts?
Each single Container needs to be given a route to get its network working. I'd like to do this when a container is being started.
I'd like to have a smart solution, i. e. the script should only be executed when its container is being started (onboot=yes).
This is important, because when the main server is rebooted unattendedly, the route should only be applied to containers that have been automatically started.
Any ideas? Thanks in advance!
Yours,
open vau zett
|
|
|
|
Re: How to start script when the VE starts [message #40671 is a reply to message #40667] |
Fri, 17 September 2010 11:57 |
open vau zett
Messages: 2 Registered: September 2010 Location: Germany
|
Junior Member |
|
|
Hello,
I'm using Suse Linux, and it seems as if there is no /etc/rc.local file.
However, there is a /etc/rc.d file, but this is only a link to /etc/init.d, where the normal startup scripts are located.
Anyway, even if I place a script there, how should I give a container instructions? I had to check, wether a container is running; isn't this much effort?
I think it would be better, if I could let openVZ do start my script per container...
|
|
|
|