|
|
@ -143,13 +143,13 @@ for ((i=0; i<${#distros[@]}; ++i)); do |
|
|
|
fi |
|
|
|
fi |
|
|
|
echo " ---- mount filesystems in ${tmpdir}/${distro}-${arch}" 1>&2 |
|
|
|
echo " ---- mount filesystems in ${tmpdir}/${distro}-${arch}" 1>&2 |
|
|
|
for x in proc sys dev; do |
|
|
|
for x in proc sys dev; do |
|
|
|
if mount | grep -q "${tmpdir}/${distro}-${arch}"/$x/; then |
|
|
|
if mount | grep -q "${tmpdir}/${distro}-${arch}"/$x; then |
|
|
|
umount -flr "${tmpdir}/${distro}-${arch}"/$x/ |
|
|
|
sudo umount -flr "${tmpdir}/${distro}-${arch}"/$x |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
done |
|
|
|
sudo mount -t proc proc "${tmpdir}/${distro}-${arch}"/proc/ |
|
|
|
sudo mount -t proc proc "${tmpdir}/${distro}-${arch}"/proc |
|
|
|
sudo mount -t sysfs sys "${tmpdir}/${distro}-${arch}"/sys/ |
|
|
|
sudo mount -t sysfs sys "${tmpdir}/${distro}-${arch}"/sys |
|
|
|
sudo mount -o bind /dev "${tmpdir}/${distro}-${arch}"/dev/ |
|
|
|
sudo mount -o bind /dev "${tmpdir}/${distro}-${arch}"/dev |
|
|
|
echo " ---- preconfigure debian packages in ${tmpdir}/${distro}-${arch}" 1>&2 |
|
|
|
echo " ---- preconfigure debian packages in ${tmpdir}/${distro}-${arch}" 1>&2 |
|
|
|
sudo chroot "${tmpdir}/${distro}-${arch}" debconf-set-selections <<EOF |
|
|
|
sudo chroot "${tmpdir}/${distro}-${arch}" debconf-set-selections <<EOF |
|
|
|
console-setup console-setup/fontsize-fb47 select 8x16 |
|
|
|
console-setup console-setup/fontsize-fb47 select 8x16 |
|
|
@ -196,8 +196,8 @@ EOF1 |
|
|
|
sudo chroot "${tmpdir}/${distro}-${arch}" apt-get -o Acquire::ForceIPv4=true install -y ${instpkgs} |
|
|
|
sudo chroot "${tmpdir}/${distro}-${arch}" apt-get -o Acquire::ForceIPv4=true install -y ${instpkgs} |
|
|
|
echo " ---- unmount filesystems in ${tmpdir}/${distro}-${arch}" 1>&2 |
|
|
|
echo " ---- unmount filesystems in ${tmpdir}/${distro}-${arch}" 1>&2 |
|
|
|
for x in proc sys dev; do |
|
|
|
for x in proc sys dev; do |
|
|
|
if mount | grep -q "${tmpdir}/${distro}-${arch}"/$x/; then |
|
|
|
if mount | grep -q "${tmpdir}/${distro}-${arch}"/$x; then |
|
|
|
umount -flr "${tmpdir}/${distro}-${arch}"/$x/ |
|
|
|
sudo umount -flr "${tmpdir}/${distro}-${arch}"/$x |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
done |
|
|
|
echo " ---- import ${tmpdir}/${distro}-${arch} to ${docker_user}/${type}:${distro}-${arch}" 1>&2 |
|
|
|
echo " ---- import ${tmpdir}/${distro}-${arch} to ${docker_user}/${type}:${distro}-${arch}" 1>&2 |
|
|
|