Close fd 3 when disabling logging
This commit is contained in:
parent
4df94e6c3d
commit
c4d21647ad
|
@ -263,7 +263,10 @@ extract_stage3() {
|
|||
|
||||
disable_logging() {
|
||||
# Disables logging which is needed before exec-ing
|
||||
# Restore stdion
|
||||
exec 1>&3
|
||||
# Close fd 3
|
||||
exec 3<&-
|
||||
}
|
||||
|
||||
gentoo_umount() {
|
||||
|
@ -274,6 +277,9 @@ gentoo_umount() {
|
|||
fi
|
||||
}
|
||||
|
||||
interactive_bash() {
|
||||
}
|
||||
|
||||
gentoo_chroot() {
|
||||
if [[ $# -eq 0 ]]; then
|
||||
cat > "$TMP_DIR/.bashrc" <<EOF
|
||||
|
|
|
@ -81,24 +81,19 @@ main_install_gentoo_in_chroot() {
|
|||
#install_ansible
|
||||
|
||||
einfo "Gentoo installation complete"
|
||||
einfo "Dropping into chrooted shell"
|
||||
su
|
||||
einfo "To chroot into the new system, simply execute the provided 'chroot' wrapper"
|
||||
}
|
||||
|
||||
main_install() {
|
||||
[[ $# == 0 ]] || die "Too many arguments"
|
||||
|
||||
gentoo_umount
|
||||
install_stage3 \
|
||||
|| die "Failed to install stage3"
|
||||
|
||||
gentoo_chroot "$GENTOO_BOOTSTRAP_BIND/scripts/main.sh" install_gentoo_in_chroot \
|
||||
|| die "Failed to install gentoo in chroot"
|
||||
install_stage3
|
||||
gentoo_chroot "$GENTOO_BOOTSTRAP_BIND/scripts/main.sh" install_gentoo_in_chroot
|
||||
}
|
||||
|
||||
main_chroot() {
|
||||
gentoo_chroot "$@" \
|
||||
|| die "Failed to execute script in chroot"
|
||||
gentoo_chroot "$@"
|
||||
}
|
||||
|
||||
main_umount() {
|
||||
|
|
Loading…
Reference in New Issue