Archived
1
1
This commit is contained in:
2024-12-13 21:44:57 +01:00
parent 5792902ff5
commit e328bd81d5
5 changed files with 16 additions and 15 deletions

View File

@@ -154,8 +154,8 @@ run-chroot "create admin group" "groupadd admin"
run-chroot "create user" "useradd --home-dir /home/${USERNAME} --create-home --skel /etc/skel ${USERNAME} --groups admin"
run-chroot "set password for user" "echo \"${USERNAME}:$PASS_USER\" | chpasswd"
run-chroot "add user to sudoers" "echo \"%admin ALL=(ALL:ALL) ALL\" >>/etc/sudoers"
run "clone keys repo" "git clone https://gitea.finnvanreenen.nl:FReenen/keys.git /opt/keys"
run-chroot "create authoized keys" "cd /opt/keys/ssh && cat "${USER_SSH_KEYS[@]}" > /home/${USERNAME}/.ssh/authorized_keys"
run "clone keys repo" "git clone https://gitea.finnvanreenen.nl/FReenen/keys.git /mnt/opt/keys"
run-chroot "create authoized keys" "cd /opt/keys/ssh && cat ${USER_SSH_KEYS} > /home/${USERNAME}/.ssh/authorized_keys"
echo
echo === prepair first boot
@@ -185,8 +185,8 @@ WantedBy=multi-user.target
EOF
"
run-chroot "enable first boot service" "systemctl enable first_boot.service"
run "copy install log to disk" "mkdir /mnt/var/logs/elfOS"
run "copy install log to disk" "cp $SCRIPT_DIR/install.log /mnt/var/logs/elfOS/install.log"
run "copy install log to disk" "mkdir /mnt/var/log/elfOS"
run "copy install log to disk" "cp $SCRIPT_DIR/install.log /mnt/var/log/elfOS/install.log"
echo
echo === umount and reboot