diff --git a/sub_scripts/lxc_build.sh b/sub_scripts/lxc_build.sh index ed85c9f..c3d0cac 100755 --- a/sub_scripts/lxc_build.sh +++ b/sub_scripts/lxc_build.sh @@ -147,10 +147,12 @@ if [ $dnsforce -eq 1 ]; then # Force la réécriture du resolv.conf echo "nameserver $dns" | sudo tee /var/lib/lxc/$LXC_NAME/rootfs/etc/resolv.conf fi +# Fix an issue with apparmor when the container start. if [ $(lsb_release -sc) != buster ] then - # Fix an issue with apparmor when the container start. echo -e "\n# Fix apparmor issues\nlxc.aa_profile = unconfined" | sudo tee -a /var/lib/lxc/$LXC_NAME/config >> "$LOG_BUILD_LXC" 2>&1 +else + echo -e "\n# Fix apparmor issues\nlxc.apparmor.profile = unconfined" | sudo tee -a /var/lib/lxc/$LXC_NAME/config >> "$LOG_BUILD_LXC" 2>&1 fi echo -e "\e[1m> Démarrage de la machine\e[0m" | tee -a "$LOG_BUILD_LXC"