cleanup + include source information in migration

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-17 09:28:35 +01:00
parent 466e654bc4
commit cd6f969789
2 changed files with 4 additions and 7 deletions

View File

@ -36,7 +36,7 @@ cdist-manifest-init localhost "$object_tmp"
find "$object_tmp" find "$object_tmp"
# Generate all objects, including from types that generate objects as well # Generate all objects, including from types that generate objects as well
cdist-manifest-recursive-all localhost "$object_tmp" cdist-manifest-run-all localhost "$object_tmp"
# See what it generated # See what it generated
find "$object_tmp" find "$object_tmp"

View File

@ -28,11 +28,7 @@
# #
. cdist-config . cdist-config
[ $# -eq 2 ] || __cdist_usage "<target host> <object_base_dir>"
if [ $# -ne 2 ]; then
__cdist_usage "<target host> <object_base_dir>"
fi
set -eu set -eu
__cdist_target_host="$1"; shift __cdist_target_host="$1"; shift
@ -89,11 +85,12 @@ while [ "$no_new_object" = "n" ]; do
# Source of the new object # Source of the new object
new_object_dir="${newobjects}/$newobject" new_object_dir="${newobjects}/$newobject"
echo "MIGRATING: $newobject"
find $new_object_dir find $new_object_dir
mkdir -p "$object_dir" mkdir -p "$object_dir"
# Move parameters and source information
mv "${new_object_dir}/"* "$object_dir" mv "${new_object_dir}/"* "$object_dir"
mv "${new_object_dir}/${__cdist_name_object_source}" "$object_dir"
set +x set +x
done < "$newobjectlist" done < "$newobjectlist"