Merge branch 'master' of https://github.com/telmich/cdist into bugfix_type__key_value

This commit is contained in:
Daniel Heule 2014-02-25 11:41:18 +01:00
commit d1c55a9acb
2 changed files with 13 additions and 10 deletions

View file

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) # 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc)
# 2014 Nico Schottelius (nico-cdist at schottelius.org)
# #
# This file is part of cdist. # This file is part of cdist.
# #
@ -70,17 +71,17 @@ _cksum() {
echo "$1" | cksum | cut -d' ' -f 1 echo "$1" | cksum | cut -d' ' -f 1
} }
# Add each key while read key; do
IFS=$'\n' cksum_key="$(_cksum "$key")"
for key in $(cat "$__object/parameter/key"); do line_id="${owner}-${cksum_key}"
unset IFS
raw_key="$(echo "$key" | tr ' ' '\n' | awk '/^ssh-(rsa|dsa)/ {printf $1" ";getline;printf $1}')" set -- "$line_id"
set -- "$(_cksum "$raw_key")"
set -- "$@" --file "$file" set -- "$@" --file "$file"
set -- "$@" --regex ".*$raw_key.*" set -- "$@" --regex ".*$key.*"
if [ "$state" = 'present' ]; then if [ "$state" = 'present' ]; then
set -- "$@" --line "$key" set -- "$@" --line "$key"
fi fi
set -- "$@" --state "$state" set -- "$@" --state "$state"
require="__block/$__object_name" __line "$@" # Ensure __line does not read stdin
done require="__block/$__object_name" __line "$@" < /dev/null
done < "$__object/parameter/key"

View file

@ -5,8 +5,10 @@ Changelog
* Exception: No braces means author == Nico Schottelius * Exception: No braces means author == Nico Schottelius
3.0.10: next:
* Type __git: Pass onwer/group/mode values to __directory * Type __git: Pass onwer/group/mode values to __directory
* Type __ssh_authorized_keys: Allow managing existing keys (Steven Armstrong)
3.0.9: 2014-02-14 3.0.9: 2014-02-14
* Core: Ignore order dependencies if override is set (Daniel Heule) * Core: Ignore order dependencies if override is set (Daniel Heule)