Browse Source

fix: [docker-host] remove warning about ``/etc/default/lxc`` not existent

postgres
Valentin Lab 6 years ago
parent
commit
73aeaf15a6
  1. 26
      precise/host/hooks/install.d/70-0k.sh

26
precise/host/hooks/install.d/70-0k.sh

@ -103,19 +103,21 @@ apt-get install -y kal-shlib-charm </dev/null
git pull -r && git pull -r &&
ln -sfn /opt/apps/lxc-scripts/bin/lxc-* /usr/local/sbin/ && ln -sfn /opt/apps/lxc-scripts/bin/lxc-* /usr/local/sbin/ &&
if [ -f /etc/default/lxc.pre-install ]; then
cp /etc/default/lxc.pre-install /etc/default/lxc
else
cp /etc/default/lxc /etc/default/lxc.pre-install
if [ -f /etc/default/lxc ]; then
if [ -f /etc/default/lxc.pre-install ]; then
cp /etc/default/lxc.pre-install /etc/default/lxc
else
cp /etc/default/lxc /etc/default/lxc.pre-install
fi
[ -d /usr/lib/lxc/templates ] && {
ln -sfn /opt/apps/lxc-scripts/usr/lib/lxc/templates/lxc-0k-ubuntu-cloud /usr/lib/lxc/templates/
echo TEMPLATE_PATH=/usr/lib/lxc/templates >> /etc/default/lxc
}
[ -d /usr/share/lxc/templates ] && {
ln -sfn /opt/apps/lxc-scripts/usr/lib/lxc/templates/lxc-0k-ubuntu-cloud /usr/share/lxc/templates
echo TEMPLATE_PATH=/usr/share/lxc/templates >> /etc/default/lxc
}
fi fi
[ -d /usr/lib/lxc/templates ] && {
ln -sfn /opt/apps/lxc-scripts/usr/lib/lxc/templates/lxc-0k-ubuntu-cloud /usr/lib/lxc/templates/
echo TEMPLATE_PATH=/usr/lib/lxc/templates >> /etc/default/lxc
}
[ -d /usr/share/lxc/templates ] && {
ln -sfn /opt/apps/lxc-scripts/usr/lib/lxc/templates/lxc-0k-ubuntu-cloud /usr/share/lxc/templates
echo TEMPLATE_PATH=/usr/share/lxc/templates >> /etc/default/lxc
}
) )
## ##

Loading…
Cancel
Save