MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.8k stars 494 forks source link

When performing bookworm update, 99-dietpi-pihole-block_public_admin.conf is not removed #6637

Open murraythegoz opened 11 months ago

murraythegoz commented 11 months ago

Creating a bug report/issue

Required Information

Additional Information (if applicable)

Steps to reproduce

  1. have a working bullseye installation
  2. have the Dietpi "block non private networks enabled"
  3. proceed with the upgrade to bookworm using the command sudo bash -c "$(curl -sSf 'https://raw.githubusercontent.com/MichaIng/DietPi/master/.meta/dietpi-bookworm-upgrade')"
  4. upon Pihole reinstallation answer "no" to the query about having only the private network enabled
  5. at the end the configuration to block from private networks is still enabled.

ls -l /etc/lighttpd/conf-enabled | grep block lrwxrwxrwx 1 root root 58 Nov 27 2020 99-dietpi-pihole-block_public_admin.conf -> ../conf-available/99-dietpi-pihole-block_public_admin.conf

Expected behaviour

the above symlink should be deleted

Actual behaviour

the above symlink is not deleted

Extra details

MichaIng commented 11 months ago

Right, this choice was meant as a "do you want to enable it or do you not want to enable it" choice, instead of "or do you want to disable it".

We could change that to have a previously enabled public access block removed when selecting "NO", but then the wording needs to be changed to reflect that. What I am a little concerned about is that non-interactive reinstalls would then always remove the block. So actually it would require a little more rework:

However, the prompt tells you the oneliner commands to enable/disable the block by yourself. A reinstall was never meant for only this job, and would be complete overkill 😉.