lxc: fix deprecated config keys in void template

This commit is contained in:
iaroki 2018-07-30 17:08:49 +03:00 committed by Toyam Cox
parent 616c7bef8b
commit 4a0e2dea70
2 changed files with 5 additions and 5 deletions

View File

@ -67,9 +67,9 @@ copy_configuration() {
# if there is exactly one veth network entry, make sure it has an # if there is exactly one veth network entry, make sure it has an
# associated hwaddr. # associated hwaddr.
nics=`grep -e '^lxc\.network\.type[ \t]*=[ \t]*veth' $path/config | wc -l` nics=`grep -e '^lxc\.net\.0\.type[ \t]*=[ \t]*veth' $path/config | wc -l`
if [ $nics -eq 1 ]; then if [ $nics -eq 1 ]; then
grep -q "^lxc.network.hwaddr" $path/config || sed -i -e "/^lxc\.network\.type[ \t]*=[ \t]*veth/a lxc.network.hwaddr = 00:16:3e:$(openssl rand -hex 3| sed 's/\(..\)/\1:/g; s/.$//')" $path/config grep -q "^lxc.net.0.hwaddr" $path/config || sed -i -e "/^lxc\.net\.0\.type[ \t]*=[ \t]*veth/a lxc.net.0.hwaddr = 00:16:3e:$(openssl rand -hex 3| sed 's/\(..\)/\1:/g; s/.$//')" $path/config
fi fi
## Add all the includes ## Add all the includes
@ -82,10 +82,10 @@ copy_configuration() {
## Add the container-specific config ## Add the container-specific config
echo "" >> $path/config echo "" >> $path/config
echo "# Container specific configuration" >> $path/config echo "# Container specific configuration" >> $path/config
grep -q "^lxc.rootfs" $path/config 2> /dev/null || echo "lxc.rootfs = $rootfs" >> $path/config grep -q "^lxc.rootfs.path" $path/config 2> /dev/null || echo "lxc.rootfs.path = $rootfs" >> $path/config
cat <<EOF >> $path/config cat <<EOF >> $path/config
lxc.utsname = $hostname lxc.uts.name = $hostname
lxc.arch = $arch lxc.arch = $arch
EOF EOF

View File

@ -3,7 +3,7 @@ _desc="Linux Containers"
pkgname=lxc pkgname=lxc
version=3.0.1 version=3.0.1
revision=1 revision=2
build_style=gnu-configure build_style=gnu-configure
configure_args="--enable-doc --enable-seccomp configure_args="--enable-doc --enable-seccomp
--enable-capabilities --disable-apparmor --with-distro=none --enable-capabilities --disable-apparmor --with-distro=none