From ebdefe4fc0efbfce217816e14c386f1cbff26a2e Mon Sep 17 00:00:00 2001 From: Greg Neagle Date: Mon, 14 Oct 2019 09:05:43 -0700 Subject: [PATCH] Attempt to autodetect repo url if repo URL is undefined _or_ is the insecure default. Addresses an issue in 3.6.3 release where autodetect was skipped. --- code/client/munkilib/updatecheck/autoconfig.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/client/munkilib/updatecheck/autoconfig.py b/code/client/munkilib/updatecheck/autoconfig.py index c2d7309c..fbe4370a 100644 --- a/code/client/munkilib/updatecheck/autoconfig.py +++ b/code/client/munkilib/updatecheck/autoconfig.py @@ -82,9 +82,10 @@ def guess_repo_url(): def autodetect_repo_url_if_needed(): - '''If Munki repo URL is not defined, attempt to discover one. If successful, - record the discovered URL in Munki's preferences.''' - if prefs.pref('SoftwareRepoURL'): + '''If Munki repo URL is not defined, (or is the insecure default) attempt + to discover one. If successful, record the discovered URL in Munki's + preferences.''' + if prefs.pref('SoftwareRepoURL') not in (None, prefs.DEFAULT_INSECURE_REPO_URL): # SoftwareRepoURL key is defined. exit. return all_keys_defined = True