1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-10 01:17:40 +03:00

F #4007: LXD Centos8 auto-context (#4040)

This commit is contained in:
Daniel Clavijo Coca 2019-12-10 13:29:45 -06:00 committed by Ruben S. Montero
parent 45f6d6dfee
commit 067f79f20c

View File

@ -215,6 +215,24 @@ $CURL $CONTEXT_URL/v$selected_tag/one-context-$selected_tag-1.el7.noarch.rpm -Ls
yum install /root/context.rpm -y >> /var/log/chroot.log 2>&1
rm /root/context.rpm
rm /dev/random /dev/urandom
EOC
)
;;
*centos/8*)
terminal="/bin/bash"
commands=$(cat <<EOC
echo "nameserver $DNS_SERVER" > /etc/resolv.conf
[ ! -e /dev/random ] && mknod -m 666 /dev/random c 1 8 >> /var/log/chroot.log 2>&1
[ ! -e /dev/urandom ] && mknod -m 666 /dev/urandom c 1 9 >> /var/log/chroot.log 2>&1
yum install $PKG_RPM -y >> /var/log/chroot.log 2>&1
$CURL $CONTEXT_URL/v$selected_tag/one-context-$selected_tag-1.el8.noarch.rpm -Lsfo /root/context.rpm >> /var/log/chroot.log 2>&1
yum install /root/context.rpm -y >> /var/log/chroot.log 2>&1
rm /root/context.rpm
rm /dev/random /dev/urandom
EOC
)