From 2e40ea1e6219a1e002231a08839894789c5b0aee Mon Sep 17 00:00:00 2001 From: ngn Date: Sat, 6 Jan 2024 18:23:08 +0300 Subject: [PATCH] Adding cert installation got matter-setup script --- matter-setup/main.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/matter-setup/main.sh b/matter-setup/main.sh index 7a30cf8..2c1cff7 100644 --- a/matter-setup/main.sh +++ b/matter-setup/main.sh @@ -61,12 +61,11 @@ if ! type mp > /dev/null; then fi info "Creating directory structure" -pushd $TARGET - mkdir -p {dev,proc,sys,run,tmp,root,home} - mkdir -p etc/mp +pushd $TARGET > /dev/null + mkdir -p {dev,proc,sys,run,tmp,root,home,boot} mkdir -p var/{log,mail,lib} mkdir -p usr/{bin,lib,sbin} - mkdir root/.gnupg + mkdir -p etc/mp ln -sf usr/lib lib ln -sf usr/lib lib64 @@ -117,8 +116,8 @@ EOF EOF cp /etc/mp/cfg etc/mp/cfg - cp ~/.gnupg/pubring.kbx root/.gnupg/pubring.kbx -popd + #cp ~/.gnupg/pubring.kbx root/.gnupg/pubring.kbx +popd > /dev/null export MP_ROOT="$TARGET" info "Syncing repositories" @@ -133,7 +132,7 @@ export MP_ROOT="$TARGET" openssl sed shadow tar tcl mandb \ man-pages tzdata util-linux which \ mp gettext iproute procps psmisc \ - mandb kbd dbus + mandb kbd dbus vim nano check_ret "mp-install command failed" unset MP_ROOT success "Installed the base system" @@ -182,9 +181,15 @@ cat > $TARGET/etc/shells << "EOF" /bin/bash EOF -info "Entering chroot, the rest is up to you!" -matter-chroot "$TARGET" +info "Installing certs" +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: +# - configure /etc/resolv.conf # - install systemd # - systemd-machine-id-setup # - systemctl preset-all