fix(deploy): patch existing dietpi.txt instead of overwriting #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "exe-dev-bot/kiosk:fix/dietpi-config-patch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The deploy tool was overwriting the entire
dietpi.txtwith a minimal 34-line template. DietPi ships a 358-line config that the system scrapes for many required settings. With our minimal replacement, first-boot setup failed to install Chromium properly, causingxinitto fall back toxterm(which also wasn't installed), resulting in:Fix
dietpi.txtfrom the flashed image, inject/replace only the settings we need, and write it back. This preserves all DietPi defaults.dietpi.txt.tmpl: No longer needed since we patch the existing file.AUTO_SETUP_CUSTOM_SCRIPT_EXEC: Was set to1(download from URL) but should be0(use local/boot/Automation_Custom_Script.sh).AUTO_SETUP_NET_ETHERNET_ENABLED=0: Explicitly disable Ethernet when using WiFi.How it works
PatchDietPiConfig()scans each line of the existing config: