Hi folks, I'd like to speciy my own init program for an VPS, so I can run my own setup stuff (before the actual init is called) without touching /sbin/init. How can I change the init command per VPS ? thx -- ------------------------------------------------------------ --------- Enrico Weigelt == metux IT service - http://www.metux.de/ ------------------------------------------------------------ --------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ ------------------------------------------------------------ ---------
Re: How to specify my own init program ?
Enrico Weigelt wrote: > Hi folks, > > > I'd like to speciy my own init program for an VPS, so I can run > my own setup stuff (before the actual init is called) without > touching /sbin/init. > > How can I change the init command per VPS ? > Just move /sbin/init to /sbin/init.real, and put your own prog as /sbin/init :) Later you can restore it back. Other way is to modify vzctl :)
* Kir Kolyshkin <kir@openvz.org> wrote: > Just move /sbin/init to /sbin/init.real, and put your own prog as > /sbin/init :) Later you can restore it back. I'm already doing so, but I dont what to touch the original /sbin/init (leave it in place). > Other way is to modify vzctl :) So that's the way to go. I'll add an new option for specifying the init program. cu -- ------------------------------------------------------------ --------- Enrico Weigelt == metux IT service - http://www.metux.de/ ------------------------------------------------------------ --------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ ------------------------------------------------------------ ---------
Enrico Weigelt writes: > * Kir Kolyshkin <kir@openvz.org> wrote: > >> Just move /sbin/init to /sbin/init.real, and put your own prog as >> /sbin/init :) Later you can restore it back. > > I'm already doing so, but I dont what to touch the original > /sbin/init (leave it in place). [...] On Debian systems, you can use dpkg-divert to ensure that package updates do not overwrite your custom /sbin/init.