[lxc-devel] startup scripts for lxc containers?
Dietmar Maurer
dietmar at proxmox.com
Sat Jan 16 17:51:13 UTC 2010
> 3. Now how to detect shutdown or reboot, i had two ideas.
Seems OpenVZ simply writes a init script into /etc/rc6.d/S00vzreboot
>#define REBOOT_MARK "/reboot"
>#define VZREBOOT "S00vzreboot"
>#define RC1 "/etc/rc.d/rc6.d"
>#define RC2 "/etc/rc6.d"
The init script simply writes the file /reboot (a simple mark - empty file).
A cron tasks checks it a container contains such file - if so, it (re)starts those containers.
- Dietmar
More information about the lxc-devel
mailing list