From c013b2e6acbd56c452bbee62a1c6a28328c5ac92 Mon Sep 17 00:00:00 2001 From: magikcypress Date: Mon, 13 Feb 2017 17:37:53 +0100 Subject: [PATCH] On cantonne a Ubuntu l'install de lxc-template et debootstrap --- sub_scripts/lxc_build.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sub_scripts/lxc_build.sh b/sub_scripts/lxc_build.sh index 7253aaf..b28b96a 100755 --- a/sub_scripts/lxc_build.sh +++ b/sub_scripts/lxc_build.sh @@ -28,7 +28,13 @@ echo -e "# interface réseau principale de l'hôte\niface=$main_iface\n" > "$scr echo -e "\e[1m> Update et install lxc lxctl\e[0m" | tee "$LOG_BUILD_LXC" sudo apt-get update >> "$LOG_BUILD_LXC" 2>&1 -sudo apt-get install -y lxc lxctl lxc-templates debootstrap >> "$LOG_BUILD_LXC" 2>&1 +sudo apt-get install -y lxc lxctl >> "$LOG_BUILD_LXC" 2>&1 + +os_name=$(sed -n -e '/PRETTY_NAME/ s/^.*=\|"\| .*//gp' /etc/os-release); +if [ os_name == "Ubuntu" ] +then + sudo apt-get install -y lxc-templates debootstrap >> "$LOG_BUILD_LXC" 2>&1 +fi sudo mkdir -p /var/lib/lxcsnaps # Créer le dossier lxcsnaps, pour s'assurer que lxc utilisera ce dossier, même avec lxc 2.