[Users] init output

Roman Kagan rkagan at sw.ru
Tue Dec 11 09:29:37 EST 2007


On Tue, Dec 11, 2007 at 01:51:30PM +0100, Dietmar Maurer wrote:
>  
> > tail: /var/lib/vz/root/777/var/log/init.log: file truncated
> > 
> > Any idea why? I already searched the sysvinit code sources, 
> > but found nothing there.
> 
> 'vzctl stop' does not work at all with my modified init - no processes
> killed.

vzctl stop effectively calls 'init 0'.  Now that /sbin/init is your
script, it unconditionally truncates the log file, and then calls
/sbin/init.orig again without arguments.

To get what you want you need a slightly more elaborate script,
something like the following (untested):

#!/bin/sh

# file must be there - create it if we're pid 1
[ $$ = 1 ] && echo >/var/log/init.log
export CONSOLE=/var/log/init.log
exec /sbin/init.org "$@"


That said, I do think we need to implement some sort of serial
console-like device for VEs.  We'll see what can be done here.

Roman.


More information about the Users mailing list