From 4f268ed193f2b552b7518b64b531ff0b1a7654e3 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 21 Dec 2024 07:10:46 +0100 Subject: [PATCH 1/2] Explicitly migrate from v5 to v6 Signed-off-by: DL6ER --- automated install/basic-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 755d8dd9..863ac432 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2326,6 +2326,12 @@ migrate_dnsmasq_configs() { mv /etc/dnsmasq.d/0{1,2,4,5}-pihole*.conf "${V6_CONF_MIGRATION_DIR}/" 2>/dev/null || true mv /etc/dnsmasq.d/06-rfc6761.conf "${V6_CONF_MIGRATION_DIR}/" 2>/dev/null || true + + # Finally, after everything is in place, we can create the new config file + # /etc/pihole/pihole.toml + # This file will be created with the default settings unless the user has + # changed settings via setupVars.conf or the other dnsmasq files moved above + pihole-FTL migrate v6 } main() { -- 2.49.1 From f0dd363c99ce9b8a5f1649c4e5d706d86ae40915 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 23 Dec 2024 08:48:05 +0100 Subject: [PATCH 2/2] Explicitly log migration process Signed-off-by: DL6ER --- automated install/basic-install.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index e283aa66..1f3f34da 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2331,7 +2331,20 @@ migrate_dnsmasq_configs() { # /etc/pihole/pihole.toml # This file will be created with the default settings unless the user has # changed settings via setupVars.conf or the other dnsmasq files moved above - pihole-FTL migrate v6 + str="Migrating Pi-hole configuration to version 6" + printf " %b %s...\\n" "${INFO}" + local FTLoutput FTLstatus + FTLoutput=$(pihole-FTL migrate v6) + FTLstatus=$? + if [[ "${FTLstatus}" -eq 0 ]]; then + printf " %b %s\\n" "${TICK}" "${str}" + else + printf " %b %s\\n" "${CROSS}" "${str}" + fi + + # Print the output of the FTL migration prefacing every line with four + # spaces for alignment + printf "%b" "${FTLoutput}" | sed 's/^/ /' } main() { -- 2.49.1