/lxc/ |
H A D | autogen.sh | 28 aclocal -I config || exit 1
|
/lxc/templates/ |
H A D | lxc-download.in | 521 configfile=$(relevant_file config) 528 ## Extract all the network config entries 529 sed -i -e "/lxc.network/{w ${LXC_PATH}/config-network" -e "d}" \ 530 ${LXC_PATH}/config 532 ## Extract any other config entry 533 sed -i -e "/lxc./{w ${LXC_PATH}/config-auto" -e "d}" ${LXC_PATH}/config 536 echo "" >> ${LXC_PATH}/config 537 echo "# Distribution configuration" >> ${LXC_PATH}/config 538 cat $configfile >> ${LXC_PATH}/config [all...] |
H A D | lxc-ubuntu-cloud.in | 63 nics=`grep -e '^lxc\.network\.type[ \t]*=[ \t]*veth' $path/config | wc -l` 65 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 69 ## Relocate all the network config entries 70 sed -i -e "/lxc.network/{w ${path}/config-network" -e "d}" $path/config 72 ## Relocate any other config entries 73 sed -i -e "/lxc./{w ${path}/config-auto" -e "d}" $path/config 76 echo "" >> $path/config [all...] |
H A D | lxc-archlinux.in | 124 local nttys=$(cat "${config_path}/config" ${shared_config} ${common_config} | grep "^lxc.tty" | head -n1 | cut -d= -f2 | tr -d "[:blank:]") 125 local devttydir=$(cat "${config_path}/config" ${shared_config} ${common_config} | grep "^lxc.devttydir" | head -n1 | cut -d= -f2 | tr -d "[:blank:]") 150 local config="${config_path}/config" 151 echo "lxc.utsname = ${name}" >> "${config}" 152 grep -q "^lxc.arch" "${config}" 2>/dev/null \ 153 || echo "lxc.arch = ${arch}" >> "${config}" 154 grep -q "^lxc.rootfs" "${config}" 2>/dev/null \ 155 || echo "lxc.rootfs = ${rootfs_path}" >> "${config}" 157 && echo "lxc.include = ${shared_config}" >> "${config}" [all...] |
H A D | lxc-ubuntu.in | 251 RES=`apt-config shell APT_PROXY Acquire::http::Proxy` 436 realrootfs=$(dirname $config)/rootfs 506 nics=`grep -e '^lxc\.network\.type[ \t]*=[ \t]*veth' $path/config | wc -l` 508 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 512 ## Relocate all the network config entries 513 sed -i -e "/lxc.network/{w ${path}/config-network" -e "d}" $path/config 515 ## Relocate any other config entries 516 sed -i -e "/lxc./{w ${path}/config [all...] |
H A D | lxc-sshd.in | 130 grep -q "^lxc.rootfs" $path/config 2>/dev/null || echo "lxc.rootfs = $rootfs" >> $path/config 131 cat <<EOF >> $path/config 153 cat <<EOF >> $path/config 159 cat <<EOF >> $path/config 164 # if no .ipv4 section in config, then have the container run dhcp 165 grep -q "^lxc.network.ipv4" $path/config || touch $rootfs/run-dhcp 168 cat <<EOF >> $path/config 251 config="$path/config" [all...] |
H A D | lxc-sparclinux.in | 99 if [ -e $container_rootfs/etc/selinux/config ]; then 100 sed -i 's|SELINUX=enforcing|SELINUX=disabled|' $container_rootfs/etc/selinux/config 103 echo "SELINUX=disabled" >$container_rootfs/etc/selinux/config 134 if [ -f "$container_rootfs/etc/sysconfig/iptables-config" ]; then 135 sed -i 's|IPTABLES_MODULES=".*|IPTABLES_MODULES=""|' $container_rootfs/etc/sysconfig/iptables-config 136 sed -i 's|IPTABLES_MODULES_UNLOAD=".*|IPTABLES_MODULES_UNLOAD="no"|' $container_rootfs/etc/sysconfig/iptables-config 232 # since lxc.devttydir is specified in the config. 305 # create the container's lxc config file 308 echo "Create configuration file $cfg_dir/config" 309 mkdir -p $cfg_dir || die "unable to create config di [all...] |
H A D | lxc-busybox.in | 103 echo "lxc.mount.entry = /dev/$dev dev/$dev none bind,optional,create=file 0 0" >> $path/config 204 # add necessary config files 342 grep -q "^lxc.rootfs" $path/config 2>/dev/null || echo "lxc.rootfs = $rootfs" >> $path/config 343 cat <<EOF >> $path/config 366 echo "lxc.mount.entry = /$dir $dir none ro,bind 0 0" >> $path/config 369 echo "lxc.mount.entry = /sys/kernel/security sys/kernel/security none ro,bind,optional 0 0" >>$path/config 377 chown $LXC_MAPPED_UID $path/config >/dev/null 2>&1 382 chgrp $LXC_MAPPED_GID $path/config >/dev/null 2>&1 428 config [all...] |
H A D | lxc-centos.in | 70 # These are only going into comments in the resulting config... 168 # Also kill it in the /etc/selinux/config file if it's there... 169 if [ -f $rootfs_path/etc/selinux/config ] 171 sed -i '/^SELINUX=/s/.*/SELINUX=disabled/' $rootfs_path/etc/selinux/config 192 # In addition to disabling pam_loginuid in the above config files 339 # since lxc.devttydir is specified in the config. 588 grep -q "^lxc.rootfs" $config_path/config 2>/dev/null || echo " 590 " >> $config_path/config 594 # interfaces in the default config. 595 mv $config_path/config [all...] |
H A D | lxc-openmandriva.in | 229 grep -q "^lxc.rootfs" $config_path/config 2>/dev/null || echo "lxc.rootfs = $rootfs_path" >> $config_path/config 230 cat <<EOF >> $config_path/config 248 cat <<EOF >> $config_path/config 253 cat <<EOF >> $config_path/config 258 cat <<EOF >> $config_path/config 263 cat <<EOF >> $config_path/config 267 cat <<EOF >> $config_path/config 330 -p,--path path to where the container rootfs will be created, defaults to @LXCPATH@. The container config will go under @LXCPATH@ in that case 427 # check for 'lxc.rootfs' passed in through default config b [all...] |
H A D | lxc-opensuse.in | 56 # set first network adapter as dhcp. This is the most common config. 302 grep -q "^lxc.rootfs" $path/config 2>/dev/null || echo " 304 " >> $path/config 308 # interfaces in the default config. It will also strip any 309 # hwaddr stanzas out of the default config since we can not share 313 mv $path/config $path/config.def 316 # This should catch variable expansions from the default config... 328 echo "${LINE}" >> $path/config 332 echo "lxc.network.hwaddr = $(create_hwaddr)" >> $path/config [all...] |
H A D | lxc-altlinux.in | 268 grep -q "^lxc.rootfs" $config_path/config 2>/dev/null || echo "lxc.rootfs = $rootfs_path" >> $config_path/config 269 cat <<EOF >> $config_path/config 286 cat <<EOF >> $config_path/config 291 cat <<EOF >> $config_path/config 296 cat <<EOF >> $config_path/config 301 cat <<EOF >> $config_path/config 305 cat <<EOF >> $config_path/config 370 -p,--path path to where the container rootfs will be created, defaults to @LXCPATH@. The container config will go under @LXCPATH@ in that case 451 # check for 'lxc.rootfs' passed in through default config b [all...] |
H A D | lxc-oracle.in | 111 # The OL 5 init honors /etc/selinux/config, but note that 120 if [ -e $container_rootfs/etc/selinux/config ]; then 121 sed -i 's|SELINUX=enforcing|SELINUX=disabled|' $container_rootfs/etc/selinux/config 124 echo "SELINUX=disabled" >$container_rootfs/etc/selinux/config 160 # default config. Number should match lxc.tty 210 if [ -f "$container_rootfs/etc/sysconfig/iptables-config" ]; then 211 sed -i 's|IPTABLES_MODULES=".*|IPTABLES_MODULES=""|' $container_rootfs/etc/sysconfig/iptables-config 212 sed -i 's|IPTABLES_MODULES_UNLOAD=".*|IPTABLES_MODULES_UNLOAD="no"|' $container_rootfs/etc/sysconfig/iptables-config 362 # since lxc.devttydir is specified in the config. 471 # create the container's lxc config fil [all...] |
H A D | lxc-fedora.in | 70 # These are only going into comments in the resulting config... 140 # Also kill it in the /etc/selinux/config file if it's there... 141 if [[ -f $rootfs_path/etc/selinux/config ]] 143 sed -i '/^SELINUX=/s/.*/SELINUX=disabled/' $rootfs_path/etc/selinux/config 164 # In addition to disabling pam_loginuid in the above config files 279 # since lxc.devttydir is specified in the config. 398 # default config. Number should match lxc.tty 1085 grep -q "^lxc.rootfs" $config_path/config 2>/dev/null || echo " 1087 " >> $config_path/config 1091 # interfaces in the default config [all...] |
H A D | lxc-debian.in | 207 config=$3 237 # default config. Number should match lxc.tty 389 nics=$(grep -ce '^lxc\.network\.type[ \t]*=[ \t]*veth' "$path/config") 391 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" 395 echo "" >> "$path/config" 396 echo "# Common configuration" >> "$path/config" 398 echo "lxc.include = ${LXC_TEMPLATE_CONFIG}/debian.common.conf" >> "$path/config" 401 echo "lxc.include = ${LXC_TEMPLATE_CONFIG}/debian.${release}.conf" >> "$path/config" 404 ## Add the container-specific config [all...] |
H A D | lxc-alpine.in | 375 local config="$1" 379 cat <<-EOF >> "$config" 479 if [ -z "$rootfs" ] && [ -f "$path/config" ]; then 480 rootfs="$(sed -nE 's/^lxc.rootfs\s*=\s*(.*)$/\1/p' "$path/config")" 497 configure_container "$path/config" "$name" "$arch" 499 einfo "Container's rootfs and config have been created" 501 Edit the config file $path/config to check/enable networking setup.
|
/lxc/src/tests/ |
H A D | lxc-test-autostart | 60 cp $CONTAINER_PATH/config $CONTAINER_PATH/config.bak 67 echo "lxc.start.auto = 1" >> $CONTAINER_PATH/config 72 echo "lxc.group = lxc-auto-test" >> $CONTAINER_PATH/config 73 echo "lxc.start.delay = 5" >> $CONTAINER_PATH/config
|
H A D | lxc-test-cloneconfig | 33 n1=`grep ^$key $CONTAINER_PATH/config | wc -l` 34 n2=`grep ^$key $CONTAINER2_PATH/config | wc -l` 56 grep ^lxc.network.hwaddr $CONTAINER_PATH/config | while read line; do 58 echo "looking for $addr in $CONTAINER2_PATH/config" 59 if grep -q $addr $CONTAINER2_PATH/config; then 69 grep ^lxc.hook $CONTAINER_PATH/config | while read line; do 71 if ! grep -q "$nline" $CONTAINER2_PATH/config; then 74 cat $CONTAINER2_PATH/config
|
H A D | lxc-test-createconfig | 41 grep -q "xx:xx" /var/lib/lxc/lxctestc/config && { echo "hwaddr not expanded"; exit 1; }
|
H A D | lxc-test-automount | 53 config=/var/lib/lxc/lxc-test-automount/config 54 sed -i '/lxc.mount.auto/d' $config 55 echo "lxc.mount.auto = proc:mixed sys:mixed" >> $config 75 sed -i '/lxc.mount.auto/d' $config 76 echo "lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed" >> $config 98 sed -i '/lxc.mount.auto/d' $config 99 echo "lxc.mount.auto = cgroup:ro proc:mixed sys:mixed" >> $config 122 sed -i '/lxc.mount.auto/d' $config 123 echo "lxc.mount.auto = cgroup:rw proc:mixed sys:mixed" >> $config [all...] |
H A D | lxc-test-apparmor-mount | 101 mkdir -p $HDIR/.config/lxc/ 102 cat > $HDIR/.config/lxc/default.conf << EOF 173 echo "lxc.aa_profile = unconfined" >> $HDIR/.local/share/lxc/$cname/config 188 sed -i '/aa_profile/d' $HDIR/.local/share/lxc/$cname/config 199 echo "lxc.aa_profile = unconfined" >> $HDIR/.local/share/lxc/$cname/config 215 sed -i '/aa_profile/d' $HDIR/.local/share/lxc/$cname/config 216 echo "lxc.aa_allow_incomplete = 1" >> $HDIR/.local/share/lxc/$cname/config
|
H A D | lxc-test-usernic.in | 81 mkdir -p /home/usernic-user/.config/lxc/ 82 cat > /home/usernic-user/.config/lxc/default.conf << EOF
|
/lxc/config/apparmor/ |
H A D | lxc-generate-aa-rules.py | 66 config = "config" variable 68 config = sys.argv[1] variable 69 with open(config) as f:
|
/lxc/src/lua-lxc/test/ |
H A D | apitest.lua | 84 assert(container:config_file_name() == string.format("%s/%s/config", LXC_PATH, optarg["n"])) 90 local cfgname = cfgpath .. "/config" 92 log(0, "Test container config path...") 94 -- create a config file in the new location from container's config 227 log(0, "Test get config from running container...") 254 log(0, "Test saving to an alternate (%s) config file...", altname) 281 log(0, "Test network %d config...", net_nr)
|
/lxc/hooks/ |
H A D | unmount-namespace.c | 40 #include <../src/config.h>
|