[lxc-devel] [PATCH] restore the dropped bits of 1c1bb85ad2b6 and also implement the logic suggested at https://lists.linuxcontainers.org/pipermail/lxc-devel/2014-December/010985.html
Serge Hallyn
serge.hallyn at ubuntu.com
Wed Jan 21 17:48:05 UTC 2015
Quoting S.Çağlar Onur (caglar at 10ur.org):
(No signed-off-by)
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> ---
> config/init/common/lxc-net.in | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/config/init/common/lxc-net.in b/config/init/common/lxc-net.in
> index 5567fee..dcbe155 100644
> --- a/config/init/common/lxc-net.in
> +++ b/config/init/common/lxc-net.in
> @@ -115,7 +115,15 @@ start() {
> if [ -n "$LXC_DOMAIN" ]; then
> LXC_DOMAIN_ARG="-s $LXC_DOMAIN -S /$LXC_DOMAIN/"
> fi
> - dnsmasq $LXC_DOMAIN_ARG -u lxc-dnsmasq --strict-order --bind-interfaces --pid-file="${varrun}"/dnsmasq.pid --conf-file=${LXC_DHCP_CONFILE} --listen-address ${LXC_ADDR} --dhcp-range ${LXC_DHCP_RANGE} --dhcp-lease-max=${LXC_DHCP_MAX} --dhcp-no-override --except-interface=lo --interface=${LXC_BRIDGE} --dhcp-leasefile=/var/lib/misc/dnsmasq.${LXC_BRIDGE}.leases --dhcp-authoritative || cleanup
> +
> + # https://lists.linuxcontainers.org/pipermail/lxc-devel/2014-October/010561.html
> + for DNSMASQ_USER in lxc-dnsmasq dnsmasq nobody
> + do
> + if getent passwd ${DNSMASQ_USER} >/dev/null; then
> + break
> + fi
> + done
> + dnsmasq $LXC_DOMAIN_ARG -u ${DNSMASQ_USER} --strict-order --bind-interfaces --pid-file="${varrun}"/dnsmasq.pid --conf-file=${LXC_DHCP_CONFILE} --listen-address ${LXC_ADDR} --dhcp-range ${LXC_DHCP_RANGE} --dhcp-lease-max=${LXC_DHCP_MAX} --dhcp-no-override --except-interface=lo --interface=${LXC_BRIDGE} --dhcp-leasefile=/var/lib/misc/dnsmasq.${LXC_BRIDGE}.leases --dhcp-authoritative || cleanup
> touch "${varrun}"/network_up
> touch "${lockdir}"/lxc-net
> }
> --
> 1.9.1
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
More information about the lxc-devel
mailing list