[3/3] cloud-init: Disable using ISP nameservers

Message ID 20200205142708.22129-3-michael.tremer@ipfire.org
State Accepted
Commit 88cb5eb18744911513c08e851f945a548b324efc
Headers
Series [1/3] dns.cgi: Do not show table header if no servers are configured |

Commit Message

Michael Tremer Feb. 5, 2020, 2:27 p.m. UTC
  This is mostly aesthetic because there are no ISP nameservers
anyways that we could use here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 src/initscripts/helper/aws-setup   | 3 +++
 src/initscripts/helper/azure-setup | 3 +++
 2 files changed, 6 insertions(+)
  

Patch

diff --git a/src/initscripts/helper/aws-setup b/src/initscripts/helper/aws-setup
index 2c3311fc2..884319822 100644
--- a/src/initscripts/helper/aws-setup
+++ b/src/initscripts/helper/aws-setup
@@ -214,6 +214,9 @@  import_aws_configuration() {
 
 	# Actions performed only on the very first start
 	if [ ! -e "/var/ipfire/main/firstsetup_ok" ]; then
+		# Disable using ISP nameservers
+		sed -e "s/^USE_ISP_NAMESERVERS=.*/USE_ISP_NAMESERVERS=off/" -i /var/ipfire/dns/settings
+
 		# Enable SSH
 		sed -e "s/ENABLE_SSH=.*/ENABLE_SSH=on/g" -i /var/ipfire/remote/settings
 
diff --git a/src/initscripts/helper/azure-setup b/src/initscripts/helper/azure-setup
index d84ec3aca..291b8e0a4 100644
--- a/src/initscripts/helper/azure-setup
+++ b/src/initscripts/helper/azure-setup
@@ -240,6 +240,9 @@  import_azure_configuration() {
 
 	# Actions performed only on the very first start
 	if [ ! -e "/var/ipfire/main/firstsetup_ok" ]; then
+		# Disable using ISP nameservers
+		sed -e "s/^USE_ISP_NAMESERVERS=.*/USE_ISP_NAMESERVERS=off/" -i /var/ipfire/dns/settings
+
 		# Enable SSH
 		sed -e "s/ENABLE_SSH=.*/ENABLE_SSH=on/g" -i /var/ipfire/remote/settings