mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 12:28:27 +00:00
Rename /etc/lxc/lxc.conf to /etc/lxc/default.conf.
This will soon be followed by the introduction of a "real" system wide /etc/lxc/lxc.conf storing global LXC settings. Signed-off-by: Dwight Engen <dwight.engen@oracle.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
c9f8b9859d
commit
bb9702b539
@ -1,15 +1,15 @@
|
|||||||
configdir = $(sysconfdir)/lxc
|
configdir = $(sysconfdir)/lxc
|
||||||
config_DATA = lxc.conf
|
config_DATA = default.conf
|
||||||
conffile = @LXC_CONFFILE@
|
defaultconf = @LXC_DEFAULT_CONF@
|
||||||
|
|
||||||
EXTRA_DIST = lxc.conf.ubuntu lxc.conf.libvirt lxc.conf.unknown
|
EXTRA_DIST = default.conf.ubuntu default.conf.libvirt default.conf.unknown
|
||||||
|
|
||||||
lxc.conf:
|
default.conf:
|
||||||
cp $(conffile) $@
|
cp $(defaultconf) $@
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
@$(RM) -f lxc.conf
|
@$(RM) -f default.conf
|
||||||
|
|
||||||
distclean-local:
|
distclean-local:
|
||||||
@$(RM) -f lxc.conf
|
@$(RM) -f default.conf
|
||||||
@$(RM) -f compile config.guess config.sub depcomp install-sh ltmain.sh missing Makefile.in Makefile
|
@$(RM) -f compile config.guess config.sub depcomp install-sh ltmain.sh missing Makefile.in Makefile
|
||||||
|
@ -39,14 +39,14 @@ if test "z$with_distro" = "z"; then
|
|||||||
fi
|
fi
|
||||||
case $with_distro in
|
case $with_distro in
|
||||||
ubuntu)
|
ubuntu)
|
||||||
conffile=lxc.conf.ubuntu
|
defaultconf=default.conf.ubuntu
|
||||||
;;
|
;;
|
||||||
redhat|fedora|oracle|oracleserver)
|
redhat|fedora|oracle|oracleserver)
|
||||||
conffile=lxc.conf.libvirt
|
defaultconf=default.conf.libvirt
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -n "Linux distribution network config unknown, defaulting to lxc.network.type = empty"
|
echo -n "Linux distribution network config unknown, defaulting to lxc.network.type = empty"
|
||||||
conffile=lxc.conf.unknown
|
defaultconf=default.conf.unknown
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AC_MSG_RESULT([$with_distro])
|
AC_MSG_RESULT([$with_distro])
|
||||||
@ -204,7 +204,7 @@ AS_AC_EXPAND(SYSCONFDIR, "$sysconfdir")
|
|||||||
AS_AC_EXPAND(DATADIR, "$datadir")
|
AS_AC_EXPAND(DATADIR, "$datadir")
|
||||||
AS_AC_EXPAND(LOCALSTATEDIR, "$localstatedir")
|
AS_AC_EXPAND(LOCALSTATEDIR, "$localstatedir")
|
||||||
AS_AC_EXPAND(DOCDIR, "$docdir")
|
AS_AC_EXPAND(DOCDIR, "$docdir")
|
||||||
AS_AC_EXPAND(LXC_CONFFILE, "$conffile")
|
AS_AC_EXPAND(LXC_DEFAULT_CONF, "$defaultconf")
|
||||||
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
|
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
|
||||||
AS_AC_EXPAND(LXCPATH, "$with_config_path")
|
AS_AC_EXPAND(LXCPATH, "$with_config_path")
|
||||||
AS_AC_EXPAND(LXCROOTFSMOUNT, "$with_rootfs_path")
|
AS_AC_EXPAND(LXCROOTFSMOUNT, "$with_rootfs_path")
|
||||||
|
@ -274,7 +274,7 @@ trap cleanup HUP INT TERM
|
|||||||
mkdir -p $lxc_path/$lxc_name
|
mkdir -p $lxc_path/$lxc_name
|
||||||
|
|
||||||
if [ -z "$lxc_config" ]; then
|
if [ -z "$lxc_config" ]; then
|
||||||
lxc_config="@SYSCONFDIR@/lxc/lxc.conf"
|
lxc_config="@SYSCONFDIR@/lxc/default.conf"
|
||||||
echo
|
echo
|
||||||
echo "$(basename $0): No config file specified, using the default config $lxc_config"
|
echo "$(basename $0): No config file specified, using the default config $lxc_config"
|
||||||
fi
|
fi
|
||||||
|
@ -762,7 +762,7 @@ static int lxcapi_get_keys(struct lxc_container *c, const char *key, char *retv,
|
|||||||
|
|
||||||
|
|
||||||
/* default config file - should probably come through autoconf */
|
/* default config file - should probably come through autoconf */
|
||||||
#define LXC_DEFAULT_CONFIG "/etc/lxc/lxc.conf"
|
#define LXC_DEFAULT_CONFIG "/etc/lxc/default.conf"
|
||||||
static bool lxcapi_save_config(struct lxc_container *c, const char *alt_file)
|
static bool lxcapi_save_config(struct lxc_container *c, const char *alt_file)
|
||||||
{
|
{
|
||||||
if (!alt_file)
|
if (!alt_file)
|
||||||
|
@ -71,7 +71,7 @@ static int create_busybox(void)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-f", "/etc/lxc/lxc.conf", "-n", MYNAME, NULL);
|
ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-f", "/etc/lxc/default.conf", "-n", MYNAME, NULL);
|
||||||
// Should not return
|
// Should not return
|
||||||
perror("execl");
|
perror("execl");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -38,7 +38,7 @@ static int create_ubuntu(void)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-f", "/etc/lxc/lxc.conf", "-n", MYNAME, NULL);
|
ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-f", "/etc/lxc/default.conf", "-n", MYNAME, NULL);
|
||||||
// Should not return
|
// Should not return
|
||||||
perror("execl");
|
perror("execl");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -38,7 +38,7 @@ static int create_ubuntu(void)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-f", "/etc/lxc/lxc.conf", "-n", MYNAME, NULL);
|
ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-f", "/etc/lxc/default.conf", "-n", MYNAME, NULL);
|
||||||
// Should not return
|
// Should not return
|
||||||
perror("execl");
|
perror("execl");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -70,7 +70,7 @@ static int create_ubuntu(void)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-f", "/etc/lxc/lxc.conf", "-n", MYNAME, NULL);
|
ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-f", "/etc/lxc/default.conf", "-n", MYNAME, NULL);
|
||||||
// Should not return
|
// Should not return
|
||||||
perror("execl");
|
perror("execl");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user