Cannot Enable I2C on Raspberry Pi 4 with DietPi

If there is a [pi4] inside, then it is likely not our config.txt in the first place, which does not contain such filters.

My other guess was that the Argon script broke it, but at least the current version check for /boot/firmware/config.txt and in case edits that one, correctly. But that script loads a number of other scripts which I won’t check through now :sweat_smile:. Or it was an old version of the script.

Generally, sed -i nastily replaces symlink with their files, as long as not --follow-symlink is used as well. And it would create this backup when using sed -i.backup (defining this suffix). On first such sed, the backup would remain the symlink, while here it is a regular file as well. But when doing it twice, the backup would be overwritten with the original regular file. This is why all sed -i calls in our scripts contain --follow-symlink. I anyway cannot imagine any case where one would want to have a symlink replaced with its edited target file, instead of editing the target file and leaving the symlink untouched.

1 Like