/* [START]: REMOVE IN LXC 3.0 */
if (config->is_legacy_key && !plc->conf->contains_legacy_key) {
plc->conf->contains_legacy_key = true;
- /* Warn the user once loud and clear that there is at least one
- * legacy configuration item in the configuration file and then
- * an update is required.
- */
- fprintf(stderr, "The configuration file contains legacy "
- "configuration keys.\nPlease update your "
- "configuration file!\n");
+ if (getenv("LXC_UPDATE_CONFIG_FORMAT")) {
+ /* Warn the user once loud and clear that there is at
+ * least one legacy configuration item in the
+ * configuration file and then an update is required.
+ */
+ fprintf(stderr, "The configuration file contains "
+ "legacy configuration keys.\nPlease "
+ "update your configuration file!\n");
+ }
}
/* [END]: REMOVE IN LXC 3.0 */
}
}
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
struct lxc_container *c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c)
exit(EXIT_FAILURE);
exit(EXIT_FAILURE);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
count = list_defined_containers(my_args.lxcpath[0], NULL, &containers);
if (count < 0)
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <libgen.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
-#include <libgen.h>
#include <sys/types.h>
#include <lxc/lxccontainer.h>
-#include "lxc.h"
-#include "log.h"
#include "arguments.h"
+#include "log.h"
+#include "lxc.h"
lxc_log_define(lxc_cgroup_ui, lxc);
exit(EXIT_FAILURE);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
state_object = my_args.argv[0];
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
fprintf(stderr, "System error loading %s\n", my_args.name);
usage(argv[0]);
}
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
c1 = lxc_container_new(orig, lxcpath);
if (!c1)
exit(EXIT_FAILURE);
struct lxc_config_items *i;
const char *value;
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
if (argc < 2)
usage(argv[0]);
if (strcmp(argv[1], "-l") == 0)
return EXIT_FAILURE;
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
fprintf(stderr, "System error loading container\n");
exit(ret);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
if (geteuid()) {
if (access(my_args.lxcpath[0], O_RDONLY) < 0) {
if (!my_args.quiet)
exit(EXIT_FAILURE);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
if (!my_args.template) {
fprintf(stderr, "A template must be specified.\n");
fprintf(stderr, "Use \"none\" if you really want a container without a rootfs.\n");
if (my_args.quiet)
quiet = true;
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
if (!quiet)
return bret;
}
-
goto err;
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
ERROR("%s doesn't exist", my_args.name);
exit(EXIT_FAILURE);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
ERROR("Failed to create lxc_container");
exit(EXIT_FAILURE);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
ERROR("No such container: %s:%s", my_args.lxcpath[0], my_args.name);
exit(ret);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
if (print_info(my_args.name, my_args.lxcpath[0]) == 0)
ret = EXIT_SUCCESS;
exit(EXIT_FAILURE);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
struct lengths max_len = {
/* default header length */
.name_length = 4, /* NAME */
exit(rc_main);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
if (quit_monitord) {
int ret = EXIT_SUCCESS;
for (i = 0; i < my_args.lxcpath_cnt; i++) {
exit(EXIT_FAILURE);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
if (geteuid()) {
if (access(my_args.lxcpath[0], O_RDONLY) < 0) {
fprintf(stderr, "You lack access to %s\n",
free(line);
fclose(f);
}
-
const char *lxcpath = my_args.lxcpath[0];
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
/*
* rcfile possibilities:
* 1. rcfile from random path specified in cli option
exit(ret);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
/* Set default timeout */
if (my_args.timeout == -2) {
if (my_args.hardstop)
exit(EXIT_FAILURE);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
ERROR("No such container: %s:%s", my_args.lxcpath[0], my_args.name);
exit(EXIT_FAILURE);
lxc_log_options_no_override();
+ /* REMOVE IN LXC 3.0 */
+ setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
+
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c)
exit(EXIT_FAILURE);