summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-02-13 18:37:50 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-02-14 12:24:27 +0000
commitf6b0ea89c7c1f6ab01709b6f7861ebf3bbc339e5 (patch)
tree390645a90f33e7f55d6e44afb2dc9f4350de9346
parent72e8e410dd56ede0be5a906e36ea6d01bebadf18 (diff)
downloadtbdiff-f6b0ea89c7c1f6ab01709b6f7861ebf3bbc339e5.tar.gz
Use the running version instead force to use 'default'baserock/pedroalvarez/bsc-rework
-rwxr-xr-xbaserock-system-config-sync/baserock-system-config-sync5
1 files changed, 3 insertions, 2 deletions
diff --git a/baserock-system-config-sync/baserock-system-config-sync b/baserock-system-config-sync/baserock-system-config-sync
index 6fc86cd..b704f59 100755
--- a/baserock-system-config-sync/baserock-system-config-sync
+++ b/baserock-system-config-sync/baserock-system-config-sync
@@ -177,14 +177,15 @@ if [ "$1" = "merge" ]; then
usage "$0"
fi
new_version="$2"
+ old_version=$(snapshot-mgr get-running)
mounting_point=$(mktemp -d)
"$mounting_script" "$mounting_point"
if [ ! -d "$mounting_point/systems/$new_version" ]; then
"$unmount" "$mounting_point"
die "Error: version not found - '$new_version'"
fi
- v1_dir="$mounting_point/systems/default/orig/etc"
- vu_dir="$mounting_point/systems/default/run/etc"
+ v1_dir="$mounting_point/systems/$old_version/orig/etc"
+ vu_dir="$mounting_point/systems/$old_version/run/etc"
v2_dir="$mounting_point/systems/$new_version/run/etc"
vt_dir="$mounting_point/systems/$new_version/run/etc.new"
mkdir "$vt_dir"