diff --git a/config/lxc.conf.libvirt b/config/lxc.conf.libvirt index 71286190e..6950dca9d 100644 --- a/config/lxc.conf.libvirt +++ b/config/lxc.conf.libvirt @@ -1,3 +1,3 @@ -lxc.network.type=veth -lxc.network.link=virbr0 -lxc.network.flags=up +lxc.network.type = veth +lxc.network.link = virbr0 +lxc.network.flags = up diff --git a/config/lxc.conf.ubuntu b/config/lxc.conf.ubuntu index d2ac1678a..0a5ac711f 100644 --- a/config/lxc.conf.ubuntu +++ b/config/lxc.conf.ubuntu @@ -1,3 +1,3 @@ -lxc.network.type=veth -lxc.network.link=lxcbr0 -lxc.network.flags=up +lxc.network.type = veth +lxc.network.link = lxcbr0 +lxc.network.flags = up diff --git a/config/lxc.conf.unknown b/config/lxc.conf.unknown index 16fa9d662..6c880103f 100644 --- a/config/lxc.conf.unknown +++ b/config/lxc.conf.unknown @@ -1 +1 @@ -lxc.network.type=empty +lxc.network.type = empty diff --git a/templates/lxc-altlinux.in b/templates/lxc-altlinux.in index 0f5c9010b..174af6abe 100644 --- a/templates/lxc-altlinux.in +++ b/templates/lxc-altlinux.in @@ -244,7 +244,7 @@ copy_configuration() lxc.utsname = $name lxc.tty = 4 lxc.pts = 1024 -lxc.mount = $config_path/fstab +lxc.mount = $config_path/fstab # When using LXC with apparmor, uncomment the next line to run unconfined: #lxc.aa_profile = unconfined @@ -461,4 +461,4 @@ if [ ! -z $clean ]; then exit 0 fi echo "container rootfs and config created" -echo "container is configured for lxc.network.type=veth and lxc.network.link=virbr0 (which is default if you have libvirt runnig)" +echo "network configured as $lxc_network_type in the $lxc_network_link" diff --git a/templates/lxc-archlinux.in b/templates/lxc-archlinux.in index 0c529ecba..5db5b8526 100644 --- a/templates/lxc-archlinux.in +++ b/templates/lxc-archlinux.in @@ -220,20 +220,20 @@ function copy_configuration { mkdir -p "${config_path}" grep -q "^lxc.rootfs" "${config_path}/config" 2>/dev/null || echo "lxc.rootfs=${rootfs_path}" >> "${config_path}/config" cat > "${config_path}/config" << EOF -lxc.utsname=${name} -lxc.tty=4 -lxc.pts=1024 -lxc.mount=${config_path}/fstab +lxc.utsname = ${name} +lxc.tty = 4 +lxc.pts = 1024 +lxc.mount = ${config_path}/fstab # When using LXC with apparmor, uncomment the next line to run unconfined: #lxc.aa_profile = unconfined #networking -lxc.network.type=${lxc_network_type} -lxc.network.flags=up -lxc.network.link=${lxc_network_link} -lxc.network.name=eth0 -lxc.network.mtu=1500 +lxc.network.type = ${lxc_network_type} +lxc.network.flags = up +lxc.network.link = ${lxc_network_link} +lxc.network.name = eth0 +lxc.network.mtu = 1500 #cgroups lxc.cgroup.devices.deny = a # /dev/null and zero diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in index 91095a391..a8af4b23e 100644 --- a/templates/lxc-busybox.in +++ b/templates/lxc-busybox.in @@ -211,8 +211,8 @@ EOF if [ -d "$rootfs/lib" ]; then cat <> $path/config -lxc.mount.entry=/lib $rootfs/lib none ro,bind 0 0 -lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0 +lxc.mount.entry = /lib $rootfs/lib none ro,bind 0 0 +lxc.mount.entry = /usr/lib $rootfs/usr/lib none ro,bind 0 0 EOF fi @@ -224,7 +224,7 @@ fi for dir in $libdirs; do if [ -d "/$dir" ] && [ -d "$rootfs/$dir" ]; then - echo "lxc.mount.entry=/$dir $dir none ro,bind 0 0" >> $path/config + echo "lxc.mount.entry = /$dir $dir none ro,bind 0 0" >> $path/config fi done } diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index 889852f98..56279a8b9 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -229,8 +229,8 @@ lxc.cgroup.devices.allow = c 5:2 rwm lxc.cgroup.devices.allow = c 254:0 rwm # mounts point -lxc.mount.entry=proc proc proc nodev,noexec,nosuid 0 0 -lxc.mount.entry=sysfs sys sysfs defaults 0 0 +lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0 +lxc.mount.entry = sysfs sys sysfs defaults 0 0 EOF if [ $? -ne 0 ]; then diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in index 47c703e55..f93edc9b0 100644 --- a/templates/lxc-fedora.in +++ b/templates/lxc-fedora.in @@ -248,7 +248,7 @@ copy_configuration() lxc.utsname = $name lxc.tty = 4 lxc.pts = 1024 -lxc.mount = $config_path/fstab +lxc.mount = $config_path/fstab # When using LXC with apparmor, uncomment the next line to run unconfined: #lxc.aa_profile = unconfined diff --git a/templates/lxc-lenny.in b/templates/lxc-lenny.in index 46de1eaeb..179272601 100644 --- a/templates/lxc-lenny.in +++ b/templates/lxc-lenny.in @@ -204,8 +204,8 @@ lxc.cgroup.devices.allow = c 5:2 rwm lxc.cgroup.devices.allow = c 254:0 rwm # mounts point -lxc.mount.entry=proc proc proc nodev,noexec,nosuid 0 0 -lxc.mount.entry=sysfs sys sysfs defaults 0 0 +lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0 +lxc.mount.entry = sysfs sys sysfs defaults 0 0 EOF if [ $? -ne 0 ]; then diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in index 4f18526fd..f6bc31c3c 100644 --- a/templates/lxc-opensuse.in +++ b/templates/lxc-opensuse.in @@ -260,7 +260,7 @@ lxc.utsname = $name lxc.tty = 4 lxc.pts = 1024 -lxc.mount = $path/fstab +lxc.mount = $path/fstab # When using LXC with apparmor, uncomment the next line to run unconfined: #lxc.aa_profile = unconfined diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index 94961389a..914a80ea3 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc-oracle.in @@ -263,7 +263,7 @@ lxc.devttydir = lxc lxc.tty = 4 lxc.pts = 1024 lxc.rootfs = $container_rootfs -lxc.mount = $cfg_dir/fstab +lxc.mount = $cfg_dir/fstab # Networking EOF diff --git a/templates/lxc-sshd.in b/templates/lxc-sshd.in index 7ba642d66..ba64cbf29 100644 --- a/templates/lxc-sshd.in +++ b/templates/lxc-sshd.in @@ -116,14 +116,14 @@ lxc.pts = 1024 # When using LXC with apparmor, uncomment the next line to run unconfined: #lxc.aa_profile = unconfined -lxc.mount.entry=/dev dev none ro,bind 0 0 -lxc.mount.entry=/lib lib none ro,bind 0 0 -lxc.mount.entry=/bin bin none ro,bind 0 0 -lxc.mount.entry=/usr usr none ro,bind 0 0 -lxc.mount.entry=/sbin sbin none ro,bind 0 0 -lxc.mount.entry=tmpfs var/run/sshd tmpfs mode=0644 0 0 -lxc.mount.entry=@LXCTEMPLATEDIR@/lxc-sshd sbin/init none bind 0 0 -lxc.mount.entry=proc $rootfs/proc proc nodev,noexec,nosuid 0 0 +lxc.mount.entry = /dev dev none ro,bind 0 0 +lxc.mount.entry = /lib lib none ro,bind 0 0 +lxc.mount.entry = /bin bin none ro,bind 0 0 +lxc.mount.entry = /usr usr none ro,bind 0 0 +lxc.mount.entry = /sbin sbin none ro,bind 0 0 +lxc.mount.entry = tmpfs var/run/sshd tmpfs mode=0644 0 0 +lxc.mount.entry = @LXCTEMPLATEDIR@/lxc-sshd sbin/init none bind 0 0 +lxc.mount.entry = proc $rootfs/proc proc nodev,noexec,nosuid 0 0 EOF # if no .ipv4 section in config, then have the container run dhcp @@ -131,7 +131,7 @@ EOF if [ "$(uname -m)" = "x86_64" ]; then cat <> $path/config -lxc.mount.entry=/lib64 lib64 none ro,bind 0 0 +lxc.mount.entry = /lib64 lib64 none ro,bind 0 0 EOF fi } diff --git a/templates/lxc-ubuntu b/templates/lxc-ubuntu index 0b55c0356..4ccb01512 100644 --- a/templates/lxc-ubuntu +++ b/templates/lxc-ubuntu @@ -331,7 +331,7 @@ lxc.utsname = $name lxc.devttydir =$ttydir lxc.tty = 4 lxc.pts = 1024 -lxc.mount = $path/fstab +lxc.mount = $path/fstab lxc.arch = $arch lxc.cap.drop = sys_module mac_admin mac_override lxc.pivotdir = lxc_putold diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in index e1e74315c..4ef5f8de5 100644 --- a/templates/lxc-ubuntu-cloud.in +++ b/templates/lxc-ubuntu-cloud.in @@ -52,7 +52,7 @@ lxc.utsname = $name lxc.tty = 4 lxc.pts = 1024 -lxc.mount = $path/fstab +lxc.mount = $path/fstab lxc.arch = $arch lxc.cap.drop = sys_module mac_admin lxc.pivotdir = lxc_putold