Commit 1c1bb85a by S.Çağlar Onur Committed by Stéphane Graber

introduce --with-distro=raspbian

Raspberry Pi kernel finally supports all the bits required by LXC [1] This patch makes "./configure --with-distro=raspbian" to install lxcbr0 based config file and upstart jobs. Also src/lxc/lxc.net now checks the existence of the lxc-dnsmasq user (and fallbacks to dnsmasq) RPI users still need to pass "MIRROR=http://archive.raspbian.org/raspbian/" parameter to lxc-create to pick the correct packages MIRROR=http://archive.raspbian.org/raspbian/ lxc-create -t debian -n rpi [Could be applied to stable-1.0 if you cherry-pick 7157a508ba3015b830877a5e4d6ca9debb3fd064] [1] https://github.com/raspberrypi/linux/issues/176Signed-off-by: 's avatarS.Çağlar Onur <caglar@10ur.org> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 3ad30ff7
...@@ -59,7 +59,7 @@ if test "z$with_distro" = "z"; then ...@@ -59,7 +59,7 @@ if test "z$with_distro" = "z"; then
with_distro="unknown" with_distro="unknown"
fi fi
case $with_distro in case $with_distro in
ubuntu) ubuntu|raspbian)
distroconf=default.conf.ubuntu distroconf=default.conf.ubuntu
;; ;;
redhat|centos|fedora|oracle|oracleserver) redhat|centos|fedora|oracle|oracleserver)
...@@ -70,7 +70,7 @@ case $with_distro in ...@@ -70,7 +70,7 @@ case $with_distro in
;; ;;
esac esac
AC_MSG_RESULT([$with_distro]) AC_MSG_RESULT([$with_distro])
AM_CONDITIONAL([HAVE_DEBIAN], [test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu"]) AM_CONDITIONAL([HAVE_DEBIAN], [test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu" -o x"$with_distro" = "xraspbian"])
AM_CONDITIONAL([DISTRO_UBUNTU], [test "x$with_distro" = "xubuntu"]) AM_CONDITIONAL([DISTRO_UBUNTU], [test "x$with_distro" = "xubuntu"])
# Check for init system type # Check for init system type
...@@ -88,7 +88,7 @@ case "$with_init_script" in ...@@ -88,7 +88,7 @@ case "$with_init_script" in
redhat|centos|oracle|oracleserver) redhat|centos|oracle|oracleserver)
init_script=sysvinit init_script=sysvinit
;; ;;
debian) debian|raspbian)
init_script=upstart,systemd init_script=upstart,systemd
;; ;;
ubuntu) ubuntu)
......
...@@ -59,7 +59,11 @@ start() { ...@@ -59,7 +59,11 @@ start() {
if [ -n "$LXC_DOMAIN" ]; then if [ -n "$LXC_DOMAIN" ]; then
LXC_DOMAIN_ARG="-s $LXC_DOMAIN -S /$LXC_DOMAIN/" LXC_DOMAIN_ARG="-s $LXC_DOMAIN -S /$LXC_DOMAIN/"
fi 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 DNSMASQ_USER="lxc-dnsmasq"
if ! getent passwd ${DNSMASQ_USER} >/dev/null; then
DNSMASQ_USER="dnsmasq"
fi
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 ${varrun}/network_up
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment