include the owner into the object_id for line

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
remotes/origin/feature_files_export
Nico Schottelius 11 years ago
parent d6b7033f2b
commit ce0f779664
  1. 7
      cdist/conf/type/__ssh_authorized_keys/manifest

@ -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.
# #
@ -75,7 +76,11 @@ IFS=$'\n'
for key in $(cat "$__object/parameter/key"); do for key in $(cat "$__object/parameter/key"); do
unset IFS unset IFS
raw_key="$(echo "$key" | tr ' ' '\n' | awk '/^ssh-(rsa|dsa)/ {printf $1" ";getline;printf $1}')" raw_key="$(echo "$key" | tr ' ' '\n' | awk '/^ssh-(rsa|dsa)/ {printf $1" ";getline;printf $1}')"
set -- "$(_cksum "$raw_key")"
cksum_key="$(_cksum "$raw_key")"
line_id="${owner}-${cksum_key}"
set -- "$line_id"
set -- "$@" --file "$file" set -- "$@" --file "$file"
set -- "$@" --regex ".*$raw_key.*" set -- "$@" --regex ".*$raw_key.*"
if [ "$state" = 'present' ]; then if [ "$state" = 'present' ]; then

Loading…
Cancel
Save