From 684a88ae157dfce74c4c68368022d7d3dff84eae Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 29 Nov 2016 13:28:09 +0000 Subject: [PATCH] Remove unnecessary symlinks from container cache As far as I can find these symlinks are unnecessary. They appear to have originally been sourced from the Archlinux 'Linux Containers' wiki page, from where it's now been removed. There are some noteworthy comments in [1] which was cited in the wiki page removal. The bits that are necessary are all included in the LXC template on a per distribution basis and we now use the download template in which everything has been prepared. [1] https://github.com/lxc/lxc/pull/1011 Change-Id: Ia538dc3baea78397b0b13ac4effb6ff1a40fc03c --- vars/redhat-7.yml | 7 ------- vars/ubuntu-14.04.yml | 7 ------- vars/ubuntu-16.04.yml | 7 ------- 3 files changed, 21 deletions(-) diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index aa6e57c9..5c2bb5b1 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -61,13 +61,6 @@ lxc_cache_map: /usr/bin/rpm -ivh /tmp/epel-release-latest-7.noarch.rpm || true yum clean all mkdir -p /var/backup - if [ -f "/usr/lib/systemd/system/poweroff.target" ];then - ln -sf /usr/lib/systemd/system/poweroff.target /etc/systemd/system/sigpwr.target || true - fi - ln -s /dev/null /etc/systemd/system/systemd-udevd.service || true - ln -s /dev/null /etc/systemd/system/systemd-udevd-control.socket || true - ln -s /dev/null /etc/systemd/system/systemd-udevd-kernel.socket || true - ln -s /dev/null /etc/systemd/system/proc-sys-fs-binfmt_misc.automount || true echo -e '{{ lxc_container_default_interfaces }}' | tee /etc/sysconfig/network-scripts/ifcfg-eth0 chage -I -1 -d -1 -m 0 -M 99999 -E -1 root if [ -a /etc/resolv.conf.org ]; then diff --git a/vars/ubuntu-14.04.yml b/vars/ubuntu-14.04.yml index 25ce9c40..846967c9 100644 --- a/vars/ubuntu-14.04.yml +++ b/vars/ubuntu-14.04.yml @@ -66,13 +66,6 @@ lxc_cache_map: userdel --force --remove ubuntu || true apt-get clean mkdir -p /var/backup - if [ -f "/usr/lib/systemd/system/poweroff.target" ];then - ln -sf /usr/lib/systemd/system/poweroff.target /etc/systemd/system/sigpwr.target || true - fi - ln -s /dev/null /etc/systemd/system/systemd-udevd.service || true - ln -s /dev/null /etc/systemd/system/systemd-udevd-control.socket || true - ln -s /dev/null /etc/systemd/system/systemd-udevd-kernel.socket || true - ln -s /dev/null /etc/systemd/system/proc-sys-fs-binfmt_misc.automount || true echo -e '{{ lxc_container_default_interfaces }}' | tee /etc/network/interfaces mkdir -p /etc/network/interfaces.d chage -I -1 -d -1 -m 0 -M 99999 -E -1 root diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index cdbf0fae..eb349c02 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -67,13 +67,6 @@ lxc_cache_map: userdel --force --remove ubuntu || true apt-get clean mkdir -p /var/backup - if [ -f "/usr/lib/systemd/system/poweroff.target" ];then - ln -sf /usr/lib/systemd/system/poweroff.target /etc/systemd/system/sigpwr.target || true - fi - ln -s /dev/null /etc/systemd/system/systemd-udevd.service || true - ln -s /dev/null /etc/systemd/system/systemd-udevd-control.socket || true - ln -s /dev/null /etc/systemd/system/systemd-udevd-kernel.socket || true - ln -s /dev/null /etc/systemd/system/proc-sys-fs-binfmt_misc.automount || true echo -e '{{ lxc_container_default_interfaces }}' | tee /etc/network/interfaces mkdir -p /etc/network/interfaces.d chage -I -1 -d -1 -m 0 -M 99999 -E -1 root