summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-02-12 22:02:16 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-02-12 22:02:16 +0000
commit33aefe215a7296bf14ac84d9cb886472ece34c27 (patch)
tree9757ad12a94229d60b591902acd0a650ee07cde9 /src/sbin
parent57d0125bf2d16fe57c06e9fc7431577048ca5b01 (diff)
downloadbcfg2-33aefe215a7296bf14ac84d9cb886472ece34c27.tar.gz
bcfg2-33aefe215a7296bf14ac84d9cb886472ece34c27.tar.bz2
bcfg2-33aefe215a7296bf14ac84d9cb886472ece34c27.zip
Add -r mode to compare
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2804 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-admin12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin
index 549d89176..6144fa341 100755
--- a/src/sbin/bcfg2-admin
+++ b/src/sbin/bcfg2-admin
@@ -214,6 +214,18 @@ def compare(new, old):
def do_compare(args):
'''run file comparison'''
+ if '-r' in args:
+ args.remove('-r')
+ (oldd, newd) = args
+ (old, new) = [os.listdir(spot) for spot in args]
+ for item in old:
+ print item
+ do_compare(oldd + '/' + item, newd + '/' + item)
+ old.remove(item)
+ new.remove(item)
+ if new:
+ print "new has extra entries", new
+ return
try:
(old, new) = args
except IndexError: