OpenVZ Forum


Home » Mailing lists » Users » init output
RE: init output [message #24859 is a reply to message #24835] Tue, 11 December 2007 12:36 Go to previous messageGo to previous message
Dietmar Maurer is currently offline  Dietmar Maurer
Messages: 52
Registered: March 2007
Member
OK, tried it both ways, but output is truncated by vzctl stop.

For example the following init script:

-----------------
#!/bin/sh

# file must be there - create it
echo >/var/log/init.log
export CONSOLE=/var/log/init.log
exec /sbin/init.org

-----------------

then I start the VE and try to view the log:

> vzctl start 777

> tail -100f /var/lib/vz/root/777/var/log/init.log
stty: standard input: Inappropriate ioctl for device
/etc/rcS.d/S03udev: line 265: echo: write error: Operation not permitted
Activating swap...done.
mount: permission denied
Cleaning up ifupdown....
....


That works quite good so far, but when I stop the VE the file gets
truncated:

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.

- Dietmar

 
> or you can replace /sbin/init with some script adding this to 
> env and running original init binary.
> 
> Kirill
> 
> Dietmar Maurer wrote:
> > But I cant do that with current vzctl, instead I need to modify the 
> > source?
> > 
> > env.c 301: char *envp[] = {"HOME=/", "TERM=linux", 
> > "CONSOLE=/var/log/init.log", NULL};
> >
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: OpenVZ specific patchset
Next Topic: Kernel 2.6.18-openvz-13-39.1d1-amd64 oops
Goto Forum:
  


Current Time: Sat Jul 20 09:23:56 GMT 2024

Total time taken to generate the page: 0.02274 seconds