Adding cert installation got matter-setup script

This commit is contained in:
ngn 2024-01-06 18:23:08 +03:00
parent 8a71420b6f
commit 2e40ea1e62

View File

@ -61,12 +61,11 @@ if ! type mp > /dev/null; then
fi fi
info "Creating directory structure" info "Creating directory structure"
pushd $TARGET pushd $TARGET > /dev/null
mkdir -p {dev,proc,sys,run,tmp,root,home} mkdir -p {dev,proc,sys,run,tmp,root,home,boot}
mkdir -p etc/mp
mkdir -p var/{log,mail,lib} mkdir -p var/{log,mail,lib}
mkdir -p usr/{bin,lib,sbin} mkdir -p usr/{bin,lib,sbin}
mkdir root/.gnupg mkdir -p etc/mp
ln -sf usr/lib lib ln -sf usr/lib lib
ln -sf usr/lib lib64 ln -sf usr/lib lib64
@ -117,8 +116,8 @@ EOF
EOF EOF
cp /etc/mp/cfg etc/mp/cfg cp /etc/mp/cfg etc/mp/cfg
cp ~/.gnupg/pubring.kbx root/.gnupg/pubring.kbx #cp ~/.gnupg/pubring.kbx root/.gnupg/pubring.kbx
popd popd > /dev/null
export MP_ROOT="$TARGET" export MP_ROOT="$TARGET"
info "Syncing repositories" info "Syncing repositories"
@ -133,7 +132,7 @@ export MP_ROOT="$TARGET"
openssl sed shadow tar tcl mandb \ openssl sed shadow tar tcl mandb \
man-pages tzdata util-linux which \ man-pages tzdata util-linux which \
mp gettext iproute procps psmisc \ mp gettext iproute procps psmisc \
mandb kbd dbus mandb kbd dbus vim nano
check_ret "mp-install command failed" check_ret "mp-install command failed"
unset MP_ROOT unset MP_ROOT
success "Installed the base system" success "Installed the base system"
@ -182,9 +181,15 @@ cat > $TARGET/etc/shells << "EOF"
/bin/bash /bin/bash
EOF EOF
info "Entering chroot, the rest is up to you!" info "Installing certs"
matter-chroot "$TARGET" wget -q https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt -O "$TARGET/certdata.txt"
matter-chroot $TARGET make-ca > /dev/null
check_ret "Failed to run make-ca, install certs manually"
rm -f "$TARGET/certdata.txt"
info "Setup complete, feel free to chroot"
# user is expected to do the following: # user is expected to do the following:
# - configure /etc/resolv.conf
# - install systemd # - install systemd
# - systemd-machine-id-setup # - systemd-machine-id-setup
# - systemctl preset-all # - systemctl preset-all