]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
14 years agoupdate the lxc.conf man page
Daniel Lezcano [Tue, 5 Oct 2010 08:28:31 +0000 (10:28 +0200)] 
update the lxc.conf man page

Update the man page regarding the image or block device
supported as a rootfs.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agoallow to specify a image or a device block as rootfs
Daniel Lezcano [Sun, 3 Oct 2010 21:09:36 +0000 (23:09 +0200)] 
allow to specify a image or a device block as rootfs

This patch allows to specify an image or a block device.

The image or the block device is mounted on rootfs->mount.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agoadd rootfs mount dir variable to pkg-config
Daniel Lezcano [Sun, 3 Oct 2010 21:09:36 +0000 (23:09 +0200)] 
add rootfs mount dir variable to pkg-config

In the case we use an image for rootfs, if we need to do extra mount
from the host to the rootfs, we have to specify the place where the
image is mounted. This value is configured by the user with the
lxc.rootfs.mount otherwise defaulting to @LXCROOTFSMOUNT@. Let's
export this variable to pkg-config, so the user can use it to build
a correct path to the rootfs.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agoDon't display an error in lxc_file_for_each_line
Daniel Lezcano [Sun, 3 Oct 2010 21:09:36 +0000 (23:09 +0200)] 
Don't display an error in lxc_file_for_each_line

Don't display an error when the callback returns an error different
from zero. A value greater than zero may means "stop". Let's the caller
to check the error.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agoUse container's proc to setup the utmp watching
Daniel Lezcano [Sun, 3 Oct 2010 21:09:35 +0000 (23:09 +0200)] 
Use container's proc to setup the utmp watching

The <rootfs>/var/run/utmp is located in:

/proc/<containerinit>/root/var/run/utmp, let's use it.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agoInitialize default mount point
Daniel Lezcano [Sun, 3 Oct 2010 21:09:35 +0000 (23:09 +0200)] 
Initialize default mount point

Let's initialize rootfs->mount to LXCROOTFSMOUNT. The value
will be overwritten by the configuration in case it is specified.

That will make the code nicer, instead of the ugly rootfs->mount checks.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agouse the rootfs mount point for the tty's
Daniel Lezcano [Sun, 3 Oct 2010 21:09:35 +0000 (23:09 +0200)] 
use the rootfs mount point for the tty's

The rootfs is always located in rootfs->mount, let's use it for
the tty.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agouse the rootfs mount point for the console
Daniel Lezcano [Sun, 3 Oct 2010 21:09:35 +0000 (23:09 +0200)] 
use the rootfs mount point for the console

The rootfs is always located in the mount point now, let's
use it.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agomount the rootfs to the mount directory first
Daniel Lezcano [Sun, 3 Oct 2010 21:09:35 +0000 (23:09 +0200)] 
mount the rootfs to the mount directory first

Split the rootfs setup by mounting the rootfs to the mount
point. This mount point will be used as the facto place where
the rootfs is placed.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agoimprove lxc-debian template to specify the suite
Daniel Lezcano [Fri, 1 Oct 2010 15:07:03 +0000 (17:07 +0200)] 
improve lxc-debian template to specify the suite

The attached patch adds a variable at the top of lxc-debian to change the SUITE.
Currently tested suites are lenny, squeeze, sid.

Also, the patch uses the dhcp3-client package instead of dhcp-client which is
deprecated in lenny and removed in squeeze.

Patch initialy from Mathieu Parent.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agoFix linking problems with libcap
Ozan Caglayan [Fri, 1 Oct 2010 15:07:03 +0000 (17:07 +0200)] 
Fix linking problems with libcap

Correctly link to libcap to avoid underlinking and unused direct
dependency problems.

Signed-off-by: Ozan Caglayan <ozan@pardus.org.tr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agoinitialize capabilities in checkpoint and restart commands
Cedric Le Goater [Fri, 1 Oct 2010 15:00:45 +0000 (17:00 +0200)] 
initialize capabilities in checkpoint and restart commands

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
14 years agoconfigure container architecture
Daniel Lezcano [Mon, 13 Sep 2010 13:36:20 +0000 (15:36 +0200)] 
configure container architecture

When a container is installed with 32bits binaries while we are
running on a 64bits host, inside the container we are seen as
64bits arch. That leads to some problems for the package updates
because the scripts will download 64bits packages instead of 32bits.

This patch defines a configuration variable to set the architecture
of the container.

lxc.arch = i686 | x86 | x86_64 | amd64

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoversion 0.7.2 lxc-0.7.2
Daniel Lezcano [Mon, 26 Jul 2010 09:01:20 +0000 (11:01 +0200)] 
version 0.7.2

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoavoid compile warning in src/lxc/console.c
Michel Normand [Fri, 23 Jul 2010 15:17:14 +0000 (17:17 +0200)] 
avoid compile warning in src/lxc/console.c

src/lxc/console.c:143: warning : return type defaults to ‘int’

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoFix bad returned value
Daniel Lezcano [Fri, 23 Jul 2010 13:10:38 +0000 (15:10 +0200)] 
Fix bad returned value

In case of error the message will be always truncated.
We check the message was truncated with the total size
received which means the kernel as more info to give.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoDont' try to remove a physical nic on error
Daniel Lezcano [Fri, 23 Jul 2010 13:10:38 +0000 (15:10 +0200)] 
Dont' try to remove a physical nic on error

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix core dump when using physical interface
Daniel Lezcano [Fri, 23 Jul 2010 13:10:38 +0000 (15:10 +0200)] 
fix core dump when using physical interface

If the physical link is not specified in the configuration
the check in if_nametoindex(netdev->link) leads to a segfault.

Check the link is specified.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Reported-by: Ferenc Wagner <wferi@niif.hu>
15 years agoset rights to lxc-init
Daniel Lezcano [Fri, 23 Jul 2010 13:10:38 +0000 (15:10 +0200)] 
set rights to lxc-init

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix compilation warning
Daniel Lezcano [Fri, 23 Jul 2010 13:10:38 +0000 (15:10 +0200)] 
fix compilation warning

Add missing include

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoinitialize the capabilties for attach and unshare
Daniel Lezcano [Fri, 23 Jul 2010 13:10:38 +0000 (15:10 +0200)] 
initialize the capabilties for attach and unshare

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix setuid to attach, create and start
Daniel Lezcano [Fri, 23 Jul 2010 13:10:38 +0000 (15:10 +0200)] 
fix setuid to attach, create and start

Fix the setuid bit root script.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix lxc.spec file
Daniel Lezcano [Fri, 23 Jul 2010 13:10:38 +0000 (15:10 +0200)] 
fix lxc.spec file

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agokeep the name of the physical interface
Daniel Lezcano [Thu, 22 Jul 2010 13:59:44 +0000 (15:59 +0200)] 
keep the name of the physical interface

When the interface used in the container is a physical
interface from the host, we keep the initial name.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Reported-by: Sabdar <sabdar@wellspringsys.com>
15 years agofix inverted network interface creation
Daniel Lezcano [Thu, 22 Jul 2010 13:59:44 +0000 (15:59 +0200)] 
fix inverted network interface creation

The list is 'lifo', so when we create the network interfaces, we
do this in the reverse order of the expected one. That is confusing.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoprovide a script to set uid bit on cli
Daniel Lezcano [Tue, 20 Jul 2010 11:45:44 +0000 (13:45 +0200)] 
provide a script to set uid bit on cli

Some file systems do not support the file posix capabilities.
The following script set the setuid bit root on the different
cli.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix console overwrite any file
Daniel Lezcano [Tue, 20 Jul 2010 11:45:44 +0000 (13:45 +0200)] 
fix console overwrite any file

Prevent to specify a file not belonging to us as the output for the console

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix log appending to any file
Daniel Lezcano [Tue, 20 Jul 2010 11:45:44 +0000 (13:45 +0200)] 
fix log appending to any file

With the capabilities, the open of the log file can be done on any
file, making possible to modifify the content of the file.

Let's drop the privilege when opening the file, so we ensure that is
no longer possible.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agomove the capabilities function to caps.c
Daniel Lezcano [Tue, 20 Jul 2010 11:45:44 +0000 (13:45 +0200)] 
move the capabilities function to caps.c

Move the reset of the capabilities to the caps.c file and
initialize correctly the capabilities for lxc-init.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoinitialize capabilities for lxc-start and lxc-execute
Daniel Lezcano [Tue, 20 Jul 2010 11:45:44 +0000 (13:45 +0200)] 
initialize capabilities for lxc-start and lxc-execute

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoadd a macro to wrap a privilegied function
Daniel Lezcano [Tue, 20 Jul 2010 11:45:44 +0000 (13:45 +0200)] 
add a macro to wrap a privilegied function

This macro is a helper to call a function into a [un]privilegied section.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoremove/restore effective capabilities
Daniel Lezcano [Tue, 20 Jul 2010 11:45:44 +0000 (13:45 +0200)] 
remove/restore effective capabilities

This patch adds the functions to drop the 'effective' capabilities and
restore them from the 'permitted' capabilities.

When the command is run as 'root' we do nothing.
When the command is run as 'lambda' user, we drop the effective capabilities
When the command is run as 'root' but real uid is not root, we keep the capabilies,
switch to real uid, and drop the effective capabilities.

This approach is compatible for root user, lambda + file capabilities
and lambda + setuid.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoRemove dead code
Daniel Lezcano [Mon, 19 Jul 2010 14:04:41 +0000 (16:04 +0200)] 
Remove dead code

This function is no longer used.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc-init finishes the remaining processes with SIGKILL
Daniel Lezcano [Tue, 13 Jul 2010 12:51:45 +0000 (14:51 +0200)] 
lxc-init finishes the remaining processes with SIGKILL

If lxc-init receives a SIGALRM, a timeout, it kills all the processes
of the container with SIGKILL. That will prevent the container to be
stuck when one process ignore the SIGTERM signal.

Each time a process exits, the timeout is resetted.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc-init kills all processes with SIGTERM
Daniel Lezcano [Tue, 13 Jul 2010 12:51:45 +0000 (14:51 +0200)] 
lxc-init kills all processes with SIGTERM

When lxc-init receives a SIGTERM, let's kill all the processes of
the pid namespace with kill -1. So the exit of the container will
happen gracefully with processes death cascade.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agogeneralize the name of the signal handler
Ferenc Wagner [Tue, 13 Jul 2010 12:51:45 +0000 (14:51 +0200)] 
generalize the name of the signal handler

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoforward signals to the container init
Ferenc Wagner [Tue, 13 Jul 2010 12:51:45 +0000 (14:51 +0200)] 
forward signals to the container init

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix compilation warning
Daniel Lezcano [Mon, 12 Jul 2010 13:13:18 +0000 (15:13 +0200)] 
fix compilation warning

Add missing include.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoMust unfreeze while stopping container
Sukadev Bhattiprolu [Mon, 12 Jul 2010 13:13:18 +0000 (15:13 +0200)] 
Must unfreeze while stopping container

As pointed out by Dan Smith, when a container is being stopped, it must
also be unfrozen after posting the SIGKILL. Otherwise if the container
is frozen when the SIGKILL is posted, the SIGKILL will remain pending
and the lxc-stop command will block until lxc-unfreeze is explicitly
called).

(lxc-stop waits for the container to exit and close the socket but since
the container is frozen, lxc-stop will block).

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Matt Helsley <matthltc@us.ibm.com>
Acked-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoEnsure frezer state has changed
Sukadev Bhattiprolu [Mon, 12 Jul 2010 13:13:18 +0000 (15:13 +0200)] 
Ensure frezer state has changed

A write to the freezer.state file does not gurantee that the state has
changed. To ensure that the freezer state is either FROZEN or THAWED,
read the freezer state and if it has not changed, repeat the write.

Changelog[v2]:
- Minor reorg of code
- Comments from Daniel Lezcano:
- lseek() before each read/write of freezer.state
- Have lxc_freeze_unfreeze() return -1 on error

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoMinor resource name array fix in src/lxc/namespace.c
Tushar Gohad [Tue, 6 Jul 2010 21:45:52 +0000 (23:45 +0200)] 
Minor resource name array fix in src/lxc/namespace.c

Signed-off-by: Tushar Gohad <tgohad@mvista.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoclose prctl window
Daniel Lezcano [Tue, 6 Jul 2010 19:26:31 +0000 (21:26 +0200)] 
close prctl window

If the pdeath signal is set after the synchro we have a window where
the parent exits with the pdeath signal not set.

In order to avoid that, we have to move the prctl before the synchro with
the parent so if the parent exits before we can set the pdeath signal, the
synchro will fail in any case and the container startup will be aborted.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc-0.7.1 lxc-0.7.1
Daniel Lezcano [Thu, 24 Jun 2010 19:04:09 +0000 (21:04 +0200)] 
lxc-0.7.1

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoremove bad default console option in ubuntu template
Daniel Lezcano [Thu, 24 Jun 2010 07:47:14 +0000 (09:47 +0200)] 
remove bad default console option in ubuntu template

Remove this options as by default container console goes to the tty
or /dev/null if not available.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc to apply mount options for bind mounts
Ciprian Dorin, Craciun [Thu, 24 Jun 2010 07:47:14 +0000 (09:47 +0200)] 
lxc to apply mount options for bind mounts

Hello all!

    This bug stalked me for a while, but only now it bit me quite
badly... (Lost about an hour of work...)

    So the culprit: inside the fstab file for the `lxc.mount` option I
can use options like `ro` together with `bind`. Unfortunately the
kernel just laughs in my face and ignores any options I've put in
there... :) But not any more: I've updated `./src/lxc/conf.c`
(`mount_file_entries` function) so that when it encounters a `bind`
option it executes it twice (one without any extra options, and a
second time with the remount flag set.)

I've marginally (as in my particular case) tested it and it works.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix /proc not mounted in debian container
Daniel Lezcano [Tue, 22 Jun 2010 22:44:13 +0000 (00:44 +0200)] 
fix /proc not mounted in debian container

Mount some systemm fs for the container. By default, /proc
is no longer mounted in debian.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix default console to /dev/tty
Daniel Lezcano [Tue, 22 Jun 2010 22:44:13 +0000 (00:44 +0200)] 
fix default console to /dev/tty

Fix default console output fall into the current tty.
Otherwise fall to /dev/null if no tty is available.

Fix at the same time, Xorg take 100% cpu.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix bad free when reading the configuration file
Daniel Lezcano [Thu, 17 Jun 2010 20:44:23 +0000 (22:44 +0200)] 
fix bad free when reading the configuration file

We change the initial pointer when parsing the line, the address
we are trying to free is modified in case there are blanks before
an option.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix sshd template
Daniel Lezcano [Thu, 17 Jun 2010 20:44:23 +0000 (22:44 +0200)] 
fix sshd template

Fixed the sshd template example.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agochange version number to 0.7.0 lxc-0.7.0
Daniel Lezcano [Thu, 17 Jun 2010 12:04:15 +0000 (14:04 +0200)] 
change version number to 0.7.0

Finally, I did it :)

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix lxc.spec.in
Daniel Lezcano [Thu, 17 Jun 2010 12:04:15 +0000 (14:04 +0200)] 
fix lxc.spec.in

Changed the directory location for documents.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoadd lxc.console documentation
Daniel Lezcano [Thu, 17 Jun 2010 12:04:15 +0000 (14:04 +0200)] 
add lxc.console documentation

Add missing documenation about the console output.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoForgotten @LIBEXECDIR@ replacement
Panagiotis H.M. Issaris [Wed, 16 Jun 2010 07:19:15 +0000 (09:19 +0200)] 
Forgotten @LIBEXECDIR@ replacement

Forgotten part of commit d674be08d4b282bb4717c51440811e39d3c2431e

Signed-off-by: Panagiotis H.M. Issaris <takis@issaris.org>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agocorrect template directory documentation
Ferenc Wagner [Wed, 16 Jun 2010 07:19:15 +0000 (09:19 +0200)] 
correct template directory documentation

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoremove misleading copy&paste comment
Ferenc Wagner [Wed, 16 Jun 2010 07:19:15 +0000 (09:19 +0200)] 
remove misleading copy&paste comment

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoFix lxc-checkconfig
Daniel Lezcano [Wed, 16 Jun 2010 07:19:15 +0000 (09:19 +0200)] 
Fix lxc-checkconfig

Fix bad comparison.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agosupport shutdown/reboot with upstart within a system container
Andrew Phillips [Mon, 14 Jun 2010 09:34:50 +0000 (11:34 +0200)] 
support shutdown/reboot with upstart within a system container

Improve resiliency of utmp.c to removal of /var/run/utmp
Add shutdown timer as we transition to shutdown from running to check for the
number of tasks remaining. Improve container state handling. We can't rely on
the previous runlevel being maintained properly.

Signed-off-by: Andrew Phillips <Andrew.Phillips@lmax.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix comment
Ferenc Wagner [Fri, 11 Jun 2010 13:56:25 +0000 (15:56 +0200)] 
fix comment

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agochange pivotdir default to mnt
Ferenc Wagner [Fri, 11 Jun 2010 13:56:25 +0000 (15:56 +0200)] 
change pivotdir default to mnt

The mnt directory has a good chance to already exist in the new root
filesystem, so creation and removal can be avoided.  This also eases
use of read only root filesystems (no configuration necessary).

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agodocument rootfs options
Ferenc Wagner [Fri, 11 Jun 2010 13:56:25 +0000 (15:56 +0200)] 
document rootfs options

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoupdate .gitignore
Daniel Lezcano [Mon, 7 Jun 2010 12:31:56 +0000 (14:31 +0200)] 
update .gitignore

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix return code
Daniel Lezcano [Mon, 7 Jun 2010 12:31:56 +0000 (14:31 +0200)] 
fix return code

Return a negative instead of a positive value.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix ipv6 acast / mcast restriction
Daniel Lezcano [Mon, 7 Jun 2010 11:25:30 +0000 (13:25 +0200)] 
fix ipv6 acast / mcast restriction

Pointer comparison is buggy as they are never null.
For an ipv6 address configuration, we always zeroed the structure,
hence the bcast and acast structure are equal to in6addr_any.

Any change of this value means the user specified something different
in the configuration file, so we fail gracefully.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoupdate .gitignore with new location
Daniel Lezcano [Mon, 7 Jun 2010 09:33:56 +0000 (11:33 +0200)] 
update .gitignore with new location

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agouint32_t is defined in stdint.h
Ferenc Wagner [Mon, 7 Jun 2010 09:33:56 +0000 (11:33 +0200)] 
uint32_t is defined in stdint.h

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoconditional use of new capabilities
Ferenc Wagner [Mon, 7 Jun 2010 09:33:56 +0000 (11:33 +0200)] 
conditional use of new capabilities

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years ago.gitignore new components
Ferenc Wagner [Mon, 7 Jun 2010 09:33:56 +0000 (11:33 +0200)] 
.gitignore new components

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoupdate the fedora template
Daniel Lezcano [Mon, 7 Jun 2010 09:33:55 +0000 (11:33 +0200)] 
update the fedora template

Update the fedora template in order to call it from the lxc-create
script.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agogenerate locales on debian
Daniel Lezcano [Mon, 7 Jun 2010 09:33:55 +0000 (11:33 +0200)] 
generate locales on debian

Let's do like the ubuntu template and generate locales automatically.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoubunutu - fix ssh runlevel stop condition
Daniel Lezcano [Mon, 7 Jun 2010 09:33:55 +0000 (11:33 +0200)] 
ubunutu - fix ssh runlevel stop condition

The default ssh upstart configuration makes the daemon to respawn
either if we are shutdowning.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofew enhancement on the ubuntu template
Wilhelm Meier [Mon, 7 Jun 2010 09:33:55 +0000 (11:33 +0200)] 
few enhancement on the ubuntu template

Improved and cleanup the ubuntu template.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Wilhelm Meier <wilhelm.meier@fh-kl.de>
15 years agomove script templates to an adequate place
Daniel Lezcano [Mon, 7 Jun 2010 09:33:55 +0000 (11:33 +0200)] 
move script templates to an adequate place

At present the lxc-{template} scripts are installed in the $bindir.
This is not the right place as specified by the FHS, so they go to
$libdir/lxc/templates.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoadd console login in ubuntu
Daniel Lezcano [Mon, 7 Jun 2010 09:33:55 +0000 (11:33 +0200)] 
add console login in ubuntu

Added console login

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoFix spec file
Andrew Phillips [Mon, 7 Jun 2010 09:33:55 +0000 (11:33 +0200)] 
Fix spec file

After I resynced to git head I noticed that this commit;
http://lxc.git.sourceforge.net/git/gitweb.cgi?p=lxc/lxc;a=commit;h=d674be08d4b282bb4717c51440811e39d3c2431e

 broke the rpm build.

This patch fixes this.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Andrew Phillips <Andrew.Phillips@lmax.com>
15 years agofixes to the ubuntu template
Willem Meier [Wed, 2 Jun 2010 13:18:17 +0000 (15:18 +0200)] 
fixes to the ubuntu template

 - Make /var/run not a tmpfs
 - Generate and update locales
 - Be less verbose
 - Remove apt-utils package

Signed-off-by: Willem Meier <wilhelm.meier@fh-kl.de>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agokill white spaces in lxc_init.c
Greg Kurz [Wed, 2 Jun 2010 13:03:34 +0000 (15:03 +0200)] 
kill white spaces in lxc_init.c

Signed-off-by: Greg Kurz <gkurz@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoREADME should not be a copy of lxc man page
Michel Normand [Wed, 2 Jun 2010 13:03:34 +0000 (15:03 +0200)] 
README should not be a copy of lxc man page

so rewrite it to its minimum

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix busybox template
Daniel Lezcano [Tue, 1 Jun 2010 16:56:54 +0000 (18:56 +0200)] 
fix busybox template

Fix various bug with the busybox template:
 * add a warning when busybox is not statically linked
 * delete the password for root (chpasswd is not available for all busybox)
 * add the new pts option

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agochange root passwd for debian template
Daniel Lezcano [Tue, 1 Jun 2010 16:56:54 +0000 (18:56 +0200)] 
change root passwd for debian template

Change default root password to 'root' and generate locales
automatically

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoFix ubuntu template
Daniel Lezcano [Tue, 1 Jun 2010 16:56:54 +0000 (18:56 +0200)] 
Fix ubuntu template

 - Fixed rootfs path.
 - Removed network section, it should to be passed to the lxc-create
configuration option in order to concatenate the configuration files
 - Generate en_US local instead of de_DE

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoubunutu template
Willem Meier [Tue, 1 Jun 2010 16:56:54 +0000 (18:56 +0200)] 
ubunutu template

Ubuntu [lucid] template script.
Allows to create an ubuntu container with the template options.

Signed-off-by: Willem Meier <wilhelm.meier@fh-kl.de>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix compilation warning
Daniel Lezcano [Tue, 1 Jun 2010 10:24:17 +0000 (12:24 +0200)] 
fix compilation warning

Fix compilation warning:

lxc_console.c: In function ‘master_handler’:
lxc_console.c:175: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix compilation warnings
Daniel Lezcano [Tue, 1 Jun 2010 10:13:32 +0000 (12:13 +0200)] 
fix compilation warnings

Fix the following warnings:

console.c: In function ‘console_handler’:
console.c:252: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
console.c:254: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
conf.c: In function ‘instanciate_veth’:
conf.c:1130: warning: ignoring return value of ‘mktemp’, declared with attribute warn_unused_result
conf.c:1135: warning: ignoring return value of ‘mktemp’, declared with attribute warn_unused_result
conf.c: In function ‘instanciate_macvlan’:
conf.c:1206: warning: ignoring return value of ‘mktemp’, declared with attribute warn_unused_result
af_unix.c: In function ‘lxc_af_unix_send_fd’:
af_unix.c:124: warning: dereferencing type-punned pointer will break strict-aliasing rules
af_unix.c: In function ‘lxc_af_unix_recv_fd’:
af_unix.c:169: warning: dereferencing type-punned pointer will break strict-aliasing rules
af_unix.c: In function ‘lxc_af_unix_send_credential’:
af_unix.c:195: warning: dereferencing type-punned pointer will break strict-aliasing rules
af_unix.c: In function ‘lxc_af_unix_rcv_credential’:
af_unix.c:237: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoadd restart framework
Cedric Le Goater [Tue, 1 Jun 2010 09:44:44 +0000 (11:44 +0200)] 
add restart framework

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc-unshare asprintf error checking
Michel Normand [Mon, 31 May 2010 09:56:47 +0000 (11:56 +0200)] 
lxc-unshare asprintf error checking

same correction in lxc_unshare.c as already done
in lxc_start.c and lxc_restart.c by Nathan in
commit fa9ab20562649707d44bfff90df44b7bc1a9f8b3

Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoupdate man pages about logpriority
Michel Normand [Mon, 31 May 2010 09:56:47 +0000 (11:56 +0200)] 
update man pages about logpriority

Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoupdate .gitignore w/ autogen.sh created files
Michel Normand [Mon, 31 May 2010 09:56:47 +0000 (11:56 +0200)] 
update .gitignore w/ autogen.sh created files

remove trailing / for .pc and patches
that may be symbolic links.

and remove all test/* files that do not exist anymore since
commit 92d385229be040cf034ac6efd9405b7bdfe06a3e

Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoremove remaining .cvsignore files
Michel Normand [Mon, 31 May 2010 09:56:47 +0000 (11:56 +0200)] 
remove remaining .cvsignore files

Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agodisable rootfs automatic detection
Daniel Lezcano [Fri, 28 May 2010 15:39:11 +0000 (17:39 +0200)] 
disable rootfs automatic detection

Avoid a warning at compile time by disabling temporary the code.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix pivot umount algorithm
Daniel Lezcano [Fri, 28 May 2010 15:39:11 +0000 (17:39 +0200)] 
fix pivot umount algorithm

Make a function and fix bad parameter to umount.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agochange repository url in MAINTAINERS
Daniel Lezcano [Fri, 28 May 2010 15:39:11 +0000 (17:39 +0200)] 
change repository url in MAINTAINERS

Changed cvs to git url.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix lxc-execute man page
Daniel Lezcano [Fri, 28 May 2010 15:39:11 +0000 (17:39 +0200)] 
fix lxc-execute man page

On buggy docbook-utils, old syntax leads to a bad formatting.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoupdate checkpoint / restart man page
Daniel Lezcano [Fri, 28 May 2010 15:01:45 +0000 (17:01 +0200)] 
update checkpoint / restart man page

Notify the checkpoint / restart commands do nothing for the moment.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoupdate lxc-checkpoint / lxc-restart man
Daniel Lezcano [Fri, 28 May 2010 15:01:45 +0000 (17:01 +0200)] 
update lxc-checkpoint / lxc-restart man

Add documentation for checkpoint / restart CLI.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoassertion on lxc_checkpoint() return value
Greg Kurz [Fri, 28 May 2010 12:29:05 +0000 (14:29 +0200)] 
assertion on lxc_checkpoint() return value

Buggy behaviour always deserves an assertion.

Signed-off-by: Greg Kurz <gkurz@fr.ibm.com>
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agofix whitespace
Daniel Lezcano [Fri, 28 May 2010 09:49:25 +0000 (11:49 +0200)] 
fix whitespace

Fix whitespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoremove unused field
Daniel Lezcano [Thu, 27 May 2010 14:27:15 +0000 (16:27 +0200)] 
remove unused field

These fields were moved to another structure but not removed from
there.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agouse ptmxmode mount option
Cedric Le Goater [Thu, 27 May 2010 14:16:30 +0000 (16:16 +0200)] 
use ptmxmode mount option

Save one call by using the ptmxmode mount option.

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agomove lxc-init to $libdir/lxc
Daniel Lezcano [Thu, 27 May 2010 12:27:13 +0000 (14:27 +0200)] 
move lxc-init to $libdir/lxc

As specified by FHS:

   /usr/lib includes object files, libraries, and internal binaries that
   are not intended to be executed directly by users or shell scripts.

   Applications may use a single subdirectory under /usr/lib. If an
   application uses a subdirectory, all architecture-dependent data
   exclusively used by the application must be placed within that
   subdirectory.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agochange the rootfs mount location and add the README
Daniel Lezcano [Thu, 27 May 2010 12:27:13 +0000 (14:27 +0200)] 
change the rootfs mount location and add the README

Previous path was $libdir/lxc, changed to $libdir/lxc/rootfs.
Added a README file to be placed in this directory, describing
the purpose of this empty directory. Having a file to be installed
in this directory makes the Makefile to automatically create the
directory at install time.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>