Merge pull request #53 from yalh76/master

Add support for aarch64
This commit is contained in:
Maniack Crudelis 2019-03-04 15:07:18 +01:00 committed by GitHub
commit e643050d53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 3 deletions

View file

@ -179,7 +179,11 @@ LXC_START () {
sleep 1 sleep 1
done done
echo "" echo ""
if [ "$(uname -m)" == "aarch64" ]
then
sleep 30
fi
local failstart=0 local failstart=0
# Check if the container is running # Check if the container is running
if ! is_lxc_running; then if ! is_lxc_running; then

View file

@ -88,7 +88,13 @@ then # Si le conteneur existe déjà
fi fi
echo -e "\e[1m> Création d'une machine debian $DISTRIB minimaliste.\e[0m" | tee -a "$LOG_BUILD_LXC" echo -e "\e[1m> Création d'une machine debian $DISTRIB minimaliste.\e[0m" | tee -a "$LOG_BUILD_LXC"
sudo lxc-create -n $LXC_NAME -t debian -- -r $DISTRIB >> "$LOG_BUILD_LXC" 2>&1 if [ "$(uname -m)" == "aarch64" ]
then
arch_arg="--arch=arm64"
else
arch_arg=""
fi
sudo lxc-create -n $LXC_NAME -t debian -- -r $DISTRIB $arch_arg >> "$LOG_BUILD_LXC" 2>&1
echo -e "\e[1m> Autoriser l'ip forwarding, pour router vers la machine virtuelle.\e[0m" | tee -a "$LOG_BUILD_LXC" echo -e "\e[1m> Autoriser l'ip forwarding, pour router vers la machine virtuelle.\e[0m" | tee -a "$LOG_BUILD_LXC"
echo "net.ipv4.ip_forward=1" | sudo tee /etc/sysctl.d/lxc_pchecker.conf >> "$LOG_BUILD_LXC" 2>&1 echo "net.ipv4.ip_forward=1" | sudo tee /etc/sysctl.d/lxc_pchecker.conf >> "$LOG_BUILD_LXC" 2>&1

View file

@ -406,7 +406,12 @@ lxc_net_check=0 # Passe sur les différents tests
while test "$lxc_net" -eq 1 # Boucle tant que la connexion internet du conteneur n'est pas réparée. while test "$lxc_net" -eq 1 # Boucle tant que la connexion internet du conteneur n'est pas réparée.
do do
REBOOT_CONTENEUR REBOOT_CONTENEUR
sleep 3 if [ "$(uname -m)" == "aarch64" ]
then
sleep 30
else
sleep 3
fi
sudo lxc-ls -f sudo lxc-ls -f
CHECK_LXC_NET CHECK_LXC_NET
lxc_net=$? lxc_net=$?