diff --git a/src/modules/base/filesystem/patches/fix-163-autologin-console.patch b/src/modules/base/filesystem/patches/fix-163-autologin-console.patch deleted file mode 100644 index 299b4087..00000000 --- a/src/modules/base/filesystem/patches/fix-163-autologin-console.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b2539cb56853fe7dbce341a36f3722c14c78b22f Mon Sep 17 00:00:00 2001 -From: Guy Sheffer -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 diff --git a/src/modules/base/start_chroot_script b/src/modules/base/start_chroot_script index d63c3c3d..9f75ae98 100644 --- a/src/modules/base/start_chroot_script +++ b/src/modules/base/start_chroot_script @@ -58,11 +58,13 @@ if [ "${BASE_ADD_USER}" == "yes" ]; then # 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 + # Since the new version has changed an lead to Error described in + # https://github.com/guysoft/CustomPiOS/issues/176 + # use a more generic way to patch the script. + if [[ -f "/usr/bin/cancel-rename" ]]; then + sed -i 's|do_boot_behaviour B2|do_boot_behaviour B1|g' /usr/bin/cancel-rename + fi + else echo_red "First user name and password not set! [FAILED]" exit 1