lxc: set RUNTIME_PATH define to the /var/run path
The default runtime directory used by LXC is /run which doesn't exist
in OpenWrt. It causes errors like:
Failed to create lock for foo
lxc-create: foo: tools/lxc_create.c: main: 260 Failed to create lxc container
There has been workaround for that in the lxc-auto.init but it requires
installing "lxc-auto" package. Replacing that "ln -s" workaround with
Makefile specifying RUNTIME_PATH define allows using pure "lxc" in
OpenWrt (without the "lxc-auto").
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 90fef036fe
)
This commit is contained in:
parent
cf242774f7
commit
20d9cf4bc2
|
@ -33,7 +33,8 @@ MESON_ARGS += \
|
|||
-Dselinux=false \
|
||||
-Dseccomp=$(if $(CONFIG_LXC_SECCOMP),true,false) \
|
||||
-Dexamples=false \
|
||||
-Db_pie=true
|
||||
-Db_pie=true \
|
||||
-Druntime-path=/var/run
|
||||
|
||||
LXC_APPLETS_BIN += \
|
||||
attach autostart cgroup copy config console create destroy device \
|
||||
|
|
|
@ -69,9 +69,5 @@ boot() {
|
|||
mount -t cgroup -o rw,nosuid,nodev,noexec,relatime,none,name=systemd cgroup /sys/fs/cgroup/systemd
|
||||
fi
|
||||
|
||||
if [ ! -d /run ]; then
|
||||
ln -s /var/run /run
|
||||
fi
|
||||
|
||||
start
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue