Fix image preparation for bionic
Ensure that the devices required for apt are present. Ensure that the required directories for gpg-agent are present. Ensure that the gpg-agent is running. Change-Id: I057ac43a7f88654affd14410c06e68bffe34104d Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
b99f48bc8b
commit
9759e45a93
|
@ -3,6 +3,10 @@
|
|||
mkdir -p /dev
|
||||
mkdir -p /proc
|
||||
mkdir -p /sys/fs/cgroup
|
||||
mkdir -p /dev/pts
|
||||
|
||||
#gnupg requires this
|
||||
mkdir -p /root/.gnupg
|
||||
|
||||
# In order for the package manager to function /dev/null, /dev/random and
|
||||
# /dev/urandom must exist. This is is being run here because some images do not
|
||||
|
@ -11,6 +15,11 @@ mkdir -p /sys/fs/cgroup
|
|||
[ ! -e /dev/random ] && mknod -m 0666 /dev/random c 1 8
|
||||
[ ! -e /dev/urandom ] && mknod -m 0666 /dev/urandom c 1 9
|
||||
|
||||
for i in {0..5}; do
|
||||
[ ! -e "/dev/pts/$i" ] && mknod -m 0666 "/dev/pts/$i" c 136 $i
|
||||
done
|
||||
[ ! -e /dev/pts/ptmx ] && mknod -m 0666 /dev/pts/ptmx c 5 2
|
||||
|
||||
# Create the directory where local facts will be stored
|
||||
mkdir -p /etc/ansible/facts.d
|
||||
|
||||
|
|
|
@ -27,6 +27,11 @@ export DEBIAN_FRONTEND=noninteractive
|
|||
|
||||
apt-get remove -y --purge snap* nspawn* lxd* resolvconf || true
|
||||
apt-get update
|
||||
apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes gnupg
|
||||
|
||||
#start gpg-agent if is is not already running
|
||||
gpg-connect-agent /bye || true
|
||||
|
||||
apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes {{ nspawn_container_distro_required_packages | join(' ') }}
|
||||
|
||||
if [[ -f "/root/repo.keys" ]]; then
|
||||
|
|
Loading…
Reference in New Issue