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>
- 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>
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>
- 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>
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>
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>
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>
same correction in lxc_unshare.c as already done
in lxc_start.c and lxc_restart.c by Nathan in
commit fa9ab20562
Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
remove trailing / for .pc and patches
that may be symbolic links.
and remove all test/* files that do not exist anymore since
commit 92d385229b
Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
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>
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>
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>
capabilities are reseted just after the filesystem is mounted.
lxc_setup_fs() is moved up, before the process is forked.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
The following patch wrap the calls on the synchronisation
socketpair in a lxc_sync_ API. It hopefully clarifies what
is done in the start sequence to the expense of more lines
of code ...
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
now that we have specific operations and specific arguments for each
sequence, lxc_restart() and lxc_start() can easily be merged under
a common subroutine.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
the following patch moves the start argument in private
structs which are opaque to lxc_spawn(). To achieve this goal,
we need to move the sv[2] socketpair and lxc_handler
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
These are trivial changes:
start_arg->name is redundant with lxc_handler->name
sv[2] can be stored directly under start_arg
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
struct lxc_operations offers 2 operations : start and post_start
which are used by the lxc-start and lxc-restart sequences to
define specific actions.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
In order to define a specific function for restart, let's create
an ops where we will be able to specify a function for restart too.
Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
In order to be able to use a single 'start' function for start
and restart, let's prepare do_start to get an extra statefile parameter.
Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
I did a little investigation about runlevels and i think we can assume
runlevels 2-5 as normal. So, we can check if system was in runlevel 2-5
and proc count is 1 and now we are in 0/6.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Denis Rizaev <Denis.Rizaev@trueoffice.ru>
That breaks the reboot because when we reexec, fd 0 and fd 1 will be
closed and these one are created by lxc, not inherited.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Add the broadcast specification, if none is specified, it is automatically
computed from the addr & mask.
syntax:
lxc.network.ipv4 = 172.20.0.2/24 172.20.255.255
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>