More verbose logging, also maybe don't rbind root over mnt pls thanks
This commit is contained in:
parent
cb8c7537c0
commit
bcaf588de5
@ -192,16 +192,18 @@ build-gentoo() {
|
|||||||
"${EDITOR:-vim}" "$_optdest/etc/fstab"
|
"${EDITOR:-vim}" "$_optdest/etc/fstab"
|
||||||
|
|
||||||
# Now we need to pivot into a chroot and finish configuration natively
|
# Now we need to pivot into a chroot and finish configuration natively
|
||||||
popd
|
popd > /dev/null 2>&1
|
||||||
log "Pivoting to container for more setup"
|
log "Pivoting to container for more setup"
|
||||||
cp "$0" "$_optdest/gentoostrap.sh"
|
cp "$0" "$_optdest/gentoostrap.sh"
|
||||||
if ! grep -qs "$_optdest/proc " /proc/mounts; then
|
if ! grep -qs "$_optdest/proc " /proc/mounts; then
|
||||||
|
log "Mounting proc"
|
||||||
mount --types proc /proc "$_optdest/proc"
|
mount --types proc /proc "$_optdest/proc"
|
||||||
fi
|
fi
|
||||||
for dir in sys dev; do
|
for dir in sys dev; do
|
||||||
if ! grep -qs "$_optdest/$mount " /proc/mounts; then
|
log "Mounting $dir"
|
||||||
mount --rbind /$mount "$_optdest/$mount"
|
if ! grep -qs "$_optdest/$dir " /proc/mounts; then
|
||||||
mount --make-rslave "$_optdest/$mount"
|
mount --rbind /$dir "$_optdest/$dir"
|
||||||
|
mount --make-rslave "$_optdest/$dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
chroot "$_optdest" /gentoostrap.sh -c
|
chroot "$_optdest" /gentoostrap.sh -c
|
||||||
|
Loading…
Reference in New Issue
Block a user