Skip to content

Commit

Permalink
Fixes #163
Browse files Browse the repository at this point in the history
  • Loading branch information
guysoft committed Jun 15, 2022
1 parent 30c8b7f commit ff73605
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From b2539cb56853fe7dbce341a36f3722c14c78b22f Mon Sep 17 00:00:00 2001
From: Guy Sheffer <guysoft@gmail.com>
Date: Wed, 15 Jun 2022 22:51:27 +0300
Subject: [PATCH] Fixes #2

As mentioned here this was planned soon: https://github.com/RPi-Distro/pi-gen/issues/614#issuecomment-1117572968
And AFAIK it needs to be B1: https://github.com/guysoft/CustomPiOS/issues/163#issuecomment-1117688020

I though I might make a PR to make this easier to merge in.
Also I am planning to make a patch out of it to have inside CustomPiOS untill this is fixed.
---
cancel-rename | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cancel-rename b/cancel-rename
index d29b8be..408b330 100755
--- a/cancel-rename
+++ b/cancel-rename
@@ -25,7 +25,7 @@ if [ "$(raspi-config nonint get_boot_cli)" -ne 0 ]; then
Exec=sh -c 'sudo userdel -r rpi-first-boot-wizard; sudo rm /etc/sudoers.d/010_wiz-nopasswd; sudo rm /etc/xdg/autostart/deluser.desktop'
EOF
else
- SUDO_USER="$1" raspi-config nonint do_boot_behaviour B2
+ SUDO_USER="$1" raspi-config nonint do_boot_behaviour B1
fi

rm -f /etc/ssh/sshd_config.d/rename_user.conf
8 changes: 8 additions & 0 deletions src/modules/base/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ if [ "${BASE_ADD_USER}" == "yes" ]; then
if [ -n "${BASE_USER}" ] || [ -n "${BASE_USER_PASSWORD}" ]; then
pw_encrypt="$(echo "${BASE_USER_PASSWORD}" | openssl passwd -6 -stdin)"
echo "${BASE_USER}:${pw_encrypt}" > /boot/userconf.txt

# Patch cancel-rename due to https://github.com/RPi-Distro/userconf-pi/issues/2
# And https://github.com/guysoft/CustomPiOS/issues/163
unpack /filesystem/patches /patches root
pushd /usr/bin
patch -p1 < /patches/fix-163-autologin-console.patch
popd
rm -rf /patches
else
echo_red "First user name and password not set! [FAILED]"
exit 1
Expand Down

0 comments on commit ff73605

Please # to comment.