diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2013-06-15 23:40:34 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-06-25 15:31:15 +0100 |
commit | 51f930da27942f1e412a16d87e38c1d6e4d215a4 (patch) | |
tree | 6c040cb0b5f7f00ebfd450811ca207beb46b173e /baserock-system-config-sync/config-sync-tests/tests.upgrades | |
parent | 160ccc9e93284ad567f476beb32620bb1e0e33b7 (diff) | |
download | tbdiff-51f930da27942f1e412a16d87e38c1d6e4d215a4.tar.gz |
Script to merge and syncronize /etc in different system versions
This commit adds a script to merge and syncronize /etc in different system versions.
The first argument read from command line is the mode, which can be one
of the following:
- test: the purpose of this mode is to test some merge cases. It
receives from the command line v1_dir, vu_dir and v2_dir and
vt_dir. The meaning of these arguments is explained in the
script.
- merge: merges the user changes in /etc in the run system of the
version given as argument
- sync: syncronizes /etc in all run versions, so that this directory is exactly
the same as the version given as argument.
This commit also includes an auxiliary script to mount the systems directory in a
give directory given as argument, and some testing folders to use with
the test mode.
Diffstat (limited to 'baserock-system-config-sync/config-sync-tests/tests.upgrades')
21 files changed, 66 insertions, 0 deletions
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file1 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file1 new file mode 100644 index 0000000..b73be5d --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file1 @@ -0,0 +1,2 @@ +whereami=v1 +version=v1 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file4 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file4 new file mode 100644 index 0000000..9972a7a --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file4 @@ -0,0 +1,2 @@ +whereami=v1,v2 +version=v1 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file5 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file5 new file mode 100644 index 0000000..8fbeda2 --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file5 @@ -0,0 +1,2 @@ +whereami=v1,vu +version=v1 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7 new file mode 100644 index 0000000..7c1f4fb --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7 @@ -0,0 +1,2 @@ +whereami=v1,vu,v2 +version=v1 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7.1 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7.1 new file mode 100644 index 0000000..d579e7b --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7.1 @@ -0,0 +1,8 @@ +a=1 +b=2 +c=3 +whereami=v1,vu,v2 +version=v1 +d=1 +e=2 +f=3 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subfile1 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subfile1 new file mode 100644 index 0000000..1cb075e --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subfile1 @@ -0,0 +1,10 @@ +qeq asda d +s +d +a sd +a +d +a +d + +d diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subsubdir2/subsubfile4 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subsubdir2/subsubfile4 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subsubdir2/subsubfile4 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file1 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file1 new file mode 100644 index 0000000..b73be5d --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file1 @@ -0,0 +1,2 @@ +whereami=v1 +version=v1 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file2 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file2 new file mode 100644 index 0000000..9fa9381 --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file2 @@ -0,0 +1,2 @@ +whereami=vu +version=vu diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file3 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file3 new file mode 100644 index 0000000..b1580e3 --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file3 @@ -0,0 +1,2 @@ +whereami=vu +version=v2 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file4 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file4 new file mode 100644 index 0000000..ebc4914 --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file4 @@ -0,0 +1,2 @@ +whereami=v1,v2 +version=v2 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file5 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file5 new file mode 100644 index 0000000..8fbeda2 --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file5 @@ -0,0 +1,2 @@ +whereami=v1,vu +version=v1 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file6 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file6 new file mode 100644 index 0000000..e76efb0 --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file6 @@ -0,0 +1,2 @@ +whereami=vu,v2 +version=v2 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7 new file mode 100644 index 0000000..93c46eb --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7 @@ -0,0 +1,2 @@ +whereami=v1,vu,v2 +version=v2 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7.1 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7.1 new file mode 100644 index 0000000..2462a4f --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7.1 @@ -0,0 +1,8 @@ +a=1 +b=2 +c=3 +whereami=v1,vu,v2 +version=v2 +d=1 +e=2 +f=3 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subfile1 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subfile1 new file mode 100644 index 0000000..1cb075e --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subfile1 @@ -0,0 +1,10 @@ +qeq asda d +s +d +a sd +a +d +a +d + +d diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subsubdir2/subsubfile4 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subsubdir2/subsubfile4 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subsubdir2/subsubfile4 diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file2 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file2 new file mode 100644 index 0000000..9fa9381 --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file2 @@ -0,0 +1,2 @@ +whereami=vu +version=vu diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file5 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file5 new file mode 100644 index 0000000..eddf4ca --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file5 @@ -0,0 +1,2 @@ +whereami=v1,vu +version=vu diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file6 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file6 new file mode 100644 index 0000000..9802a97 --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file6 @@ -0,0 +1,2 @@ +whereami=vu,v2 +version=vu diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file7 b/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file7 new file mode 100644 index 0000000..24553ad --- /dev/null +++ b/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file7 @@ -0,0 +1,2 @@ +whereami=v1,vu,v2 +version=vu |