diff options
author | Rob Austein <sra@hactrn.net> | 2014-04-01 22:30:07 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-04-01 22:30:07 +0000 |
commit | 879ec3d5ad353c8929166380dc1d55658b8f23f1 (patch) | |
tree | 86334344ba796d9c89bcde51f945ebe931985e1d /rpkid | |
parent | c40352441df473bf519a4766310d7659f94cac37 (diff) |
Something seriously weird going on with scoping rules, rewrite yet again.
svn path=/branches/tk671/; revision=5726
Diffstat (limited to 'rpkid')
-rw-r--r-- | rpkid/upgrade-scripts/upgrade-irdbd-to-0.5678.py | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/rpkid/upgrade-scripts/upgrade-irdbd-to-0.5678.py b/rpkid/upgrade-scripts/upgrade-irdbd-to-0.5678.py index 30baaf8a..c612e0f1 100644 --- a/rpkid/upgrade-scripts/upgrade-irdbd-to-0.5678.py +++ b/rpkid/upgrade-scripts/upgrade-irdbd-to-0.5678.py @@ -34,33 +34,32 @@ print """ properly again. Attempting to do this automatically... """ -import subprocess, time +import time +import os.path +import subprocess +import rpki.autoconf + +rpkic = os.path.join(rpki.autoconf.sbindir, "rpkic") print "Pausing to let RPKI daemons start up" time.sleep(10) -def rpkic(cmd): - import subprocess - subprocess.check_call(("rpkic", "-i", handle, cmd)) - -handles = subprocess.check_output(("rpkic", "list_self_handles")).splitlines() +handles = subprocess.check_output((rpkic, "list_self_handles")).splitlines() for handle in handles: print "Processing", handle print "Asking parent to reissue with new key" - rpkic("up_down_rekey") + subprocess.check_call((rpkic, "-i", handle, "up_down_rekey")) print "Asking parent to revoke old key" - rpkic("up_down_revoke") + subprocess.check_call((rpkic, "-i", handle, "up_down_revoke")) print "Reissuing everything" - rpkic("force_reissue") + subprocess.check_call((rpkic, "-i", handle, "force_reissue")) print "Forcing publication" - rpkic("force_publication") - -del rpkic + subprocess.check_call((rpkic, "-i", handle, "force_publication")) ''') |