summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAdrian Likins <alikins@redhat.com>2008-03-05 15:48:08 -0500
committerAdrian Likins <alikins@redhat.com>2008-03-05 15:48:08 -0500
commitb47d0fe7121f0a85ae6260c272cd03fc01bb2914 (patch)
treefbf6d677728b7aa4e1d09919cee6fac80e7f1d78 /scripts
parentb6cdd04d1e6620214f3d99a36e6f07c79cc3b73f (diff)
downloadthird_party-func-b47d0fe7121f0a85ae6260c272cd03fc01bb2914.tar.gz
third_party-func-b47d0fe7121f0a85ae6260c272cd03fc01bb2914.tar.xz
third_party-func-b47d0fe7121f0a85ae6260c272cd03fc01bb2914.zip
remove debug spew we no longer need I hope
rename the "funcmaster.*" to "certmaster.*"
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update-func27
1 files changed, 10 insertions, 17 deletions
diff --git a/scripts/update-func b/scripts/update-func
index faf4dd1..4312f3d 100755
--- a/scripts/update-func
+++ b/scripts/update-func
@@ -50,18 +50,7 @@ FUNC_CERTMASTER_CERT_DIR="/var/lib/func/certmaster/"
CERTMASTER_CERT_DIR="/var/lib/certmaster/"
-def list_files(files):
- for filename in files:
- if os.access(filename, os.R_OK):
- print filename, os.stat(filename)
- else:
- print "%s not found" % filename
-
-list_files([FUNC_MINION_CONF, CERTMASTER_MINION_CONF, FUNC_MINION_CERT_DIR,
- CERTMASTER_MINION_CERT_DIR, FUNC_CERTMASTER_CERT_DIR,CERTMASTER_CERT_DIR])
-
-
def func_minion_has_cert_info(fmc_content):
for line in fmc_content:
match = line.find("cert_dir")
@@ -94,7 +83,7 @@ def migrate_minion_conf_settings():
# ugh, do I really want to parse these files?
# guess I kind of have to...
- print "migrating settings"
+# print "migrating settings"
# see if we have edited this file before
fc_f = open(FUNC_MINION_CONF, "r")
@@ -155,16 +144,20 @@ if cert_dir:
FUNC_MINION_CERT_DIR = cert_dir
if os.access(FUNC_MINION_CERT_DIR, os.R_OK):
- print "copying files from %s/* to %s" % (FUNC_MINION_CERT_DIR, CERTMASTER_MINION_CERT_DIR)
+# print "copying files from %s/* to %s" % (FUNC_MINION_CERT_DIR, CERTMASTER_MINION_CERT_DIR)
# output = subprocess.Popen(["cp", "-var", "%s/*" % FUNC_MINION_CERT_DIR, CERTMASTER_MINION_CERT_DIR], stdout=subprocess.PIPE).communicate()[0]
output = subprocess.Popen("cp -var %s/* %s" % (FUNC_MINION_CERT_DIR, CERTMASTER_MINION_CERT_DIR), shell=True, stdout=subprocess.PIPE).communicate()[0]
- print "foo", output
+# print "foo", output
if os.access(CERTMASTER_CERT_DIR, os.R_OK):
- print "copyying files from %s to %s" % (FUNC_CERTMASTER_CERT_DIR, CERTMASTER_CERT_DIR)
+# print "copyying files from %s to %s" % (FUNC_CERTMASTER_CERT_DIR, CERTMASTER_CERT_DIR)
output = subprocess.Popen(["cp", "-var", FUNC_CERTMASTER_CERT_DIR, CERTMASTER_CERT_DIR], stdout=subprocess.PIPE).communicate()[0]
- print output
-
+# print output
+
+if os.access("/etc/pki/certmaster/ca/funcmaster.crt", os.R_OK):
+ os.rename("/etc/pki/certmaster/ca/funcmaster.crt", "/etc/pki/certmaster/ca/certmaster.crt")
+ os.rename("/etc/pki/certmaster/ca/funcmaster.key", "/etc/pki/certmaster/ca/certmaster.key")
+