Fixing up few issues, adding resolv.conf linking to chroot script
This commit is contained in:
@ -73,18 +73,10 @@ check_retc() {
|
||||
if [ $? -ne 0 ]; then
|
||||
errorne "$1"
|
||||
clean_tmpdir
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
setup_dns() {
|
||||
info "Setting up DNS"
|
||||
echo "nameserver 1.1.1.1" >> "$TMPDIR/etc/resolv.conf"
|
||||
}
|
||||
|
||||
clean_dns(){
|
||||
rm "$TMPDIR/etc/resolv.conf"
|
||||
}
|
||||
|
||||
clean_tmpdir(){
|
||||
if [ -d $TMPDIR ]; then
|
||||
info "Cleaning up temp directory"
|
||||
@ -186,20 +178,18 @@ for p2 in "${PKGS2[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
setup_dns
|
||||
info "Adding public keys"
|
||||
matter-chroot "$TMPDIR" gpg --receive-keys $keys_str
|
||||
check_retc "Failed to add public keys"
|
||||
info "Adding public keys"
|
||||
matter-chroot "$TMPDIR" gpg --receive-keys $keys_str
|
||||
check_retc "Failed to add public keys"
|
||||
|
||||
if [ ! -z "${PKGS1}" ]; then
|
||||
info "Installing extra packages (1)"
|
||||
matter-chroot "$TMPDIR" mp-sync
|
||||
check_retc "Sync failed"
|
||||
if [ ! -z "${PKGS1}" ]; then
|
||||
info "Installing extra packages (1)"
|
||||
matter-chroot "$TMPDIR" mp-sync
|
||||
check_retc "Sync failed"
|
||||
|
||||
matter-chroot "$TMPDIR" MP_YES=1 mp-install $pkgs1_str
|
||||
check_retc "Install failed"
|
||||
fi
|
||||
clean_dns
|
||||
matter-chroot "$TMPDIR" MP_YES=1 mp-install $pkgs1_str
|
||||
check_retc "Install failed"
|
||||
fi
|
||||
|
||||
info "Running build script"
|
||||
echo "source /iso.sh && build" > "$TMPDIR/stager.sh"
|
||||
@ -218,10 +208,8 @@ popd > /dev/null
|
||||
|
||||
if [ ! -z "${PKGS2}" ]; then
|
||||
info "Installing extra packages (2)"
|
||||
setup_dns
|
||||
matter-chroot "$TMPDIR" MP_YES=1 mp-install $pkgs2_str
|
||||
check_ret "Install failed"
|
||||
clean_dns
|
||||
matter-chroot "$TMPDIR" MP_YES=1 mp-install $pkgs2_str
|
||||
check_ret "Install failed"
|
||||
fi
|
||||
|
||||
info "Copying over the bootdir"
|
||||
|
Reference in New Issue
Block a user