rename config.txt file to diya-config.txt to avoid conflict wuth rpi

This commit is contained in:
DanyLE 2025-03-27 11:57:29 +01:00
parent 8791a5d86d
commit 7b75b29500
4 changed files with 8 additions and 8 deletions

View File

@ -8,7 +8,7 @@ EXTRA_USERS_PARAMS = "usermod -d /home/diya -p 2Pe/4xyFxsokE diya; \
usermod -a -G audio diya; \
usermod -a -G sudo diya; \
"
IMAGE_BOOT_FILES:append = " fs_resize config.txt recovery-${MACHINE}.cpio.gz Image "
IMAGE_BOOT_FILES:append = " fs_resize diya-config.txt recovery-${MACHINE}.cpio.gz Image "
IMAGE_INSTALL:append = "kernel-modules \
e2fsprogs \

View File

@ -31,7 +31,7 @@ do_install() {
install -m 0755 ${WORKDIR}/boot-to-recovery ${D}/sbin/boot-to-recovery
install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
cat << EOF > ${DEPLOY_DIR_IMAGE}/config.txt
cat << EOF > ${DEPLOY_DIR_IMAGE}/diya-config.txt
recovery=false
recovery_image=recovery-${MACHINE}.cpio.gz
console=both

View File

@ -7,15 +7,15 @@ fi
. /etc/profile
if [ ! -e /boot/config.txt ]; then
if [ ! -e /boot/diya-config.txt ]; then
# prepare env for recovery boot
cat << EOF > /boot/config.txt
cat << EOF > /boot/diya-config.txt
recovery=true
recovery_image=recovery-${MACHINE}.cpio.gz
EOF
else
sed -i 's/^.*recovery.*/recovery=true/g' /boot/config.txt || \
echo "recovery=true" >> /boot/config.txt
sed -i 's/^.*recovery.*/recovery=true/g' /boot/diya-config.txt || \
echo "recovery=true" >> /boot/diya-config.txt
fi
echo "Rebooting to recovery mode"
reboot

View File

@ -7,8 +7,8 @@ DESC="Custom configuration"
case "$1" in
start)
echo -n "Start $DESC: "
sed -i 's/^.*recovery.*/recovery=false/g' /boot/config.txt || \
echo "recovery=false" >> /boot/config.txt
sed -i 's/^.*recovery.*/recovery=false/g' /boot/diya-config.txt || \
echo "recovery=false" >> /boot/diya-config.txt
;;
*)