OpenVZ Forum


Home » Mailing lists » Users » How to specify my own init program ?
How to specify my own init program ? [message #11585] Tue, 27 March 2007 18:16 Go to next message
Enrico Weigelt is currently offline  Enrico Weigelt
Messages: 31
Registered: July 2006
Member
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 ? [message #11590 is a reply to message #11585] Tue, 27 March 2007 18:41 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

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 :)
Re: How to specify my own init program ? [message #11592 is a reply to message #11590] Tue, 27 March 2007 18:57 Go to previous messageGo to next message
Enrico Weigelt is currently offline  Enrico Weigelt
Messages: 31
Registered: July 2006
Member
* 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/
------------------------------------------------------------ ---------
Re: How to specify my own init program ? [message #11624 is a reply to message #11592] Thu, 29 March 2007 11:10 Go to previous message
Jim Nightshade is currently offline  Jim Nightshade
Messages: 3
Registered: November 2006
Junior Member
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.
Previous Topic: New kernel branches structure
Next Topic: Conf file corruption
Goto Forum:
  


Current Time: Fri Jan 27 05:24:44 GMT 2023

Total time taken to generate the page: 0.00840 seconds