include the owner into the object_id for line

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2014-02-24 16:00:12 +01:00
parent d6b7033f2b
commit ce0f779664

View file

@ -1,6 +1,7 @@
#!/bin/sh
#
# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc)
# 2014 Nico Schottelius (nico-cdist at schottelius.org)
#
# This file is part of cdist.
#
@ -75,7 +76,11 @@ IFS=$'\n'
for key in $(cat "$__object/parameter/key"); do
unset IFS
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 -- "$@" --regex ".*$raw_key.*"
if [ "$state" = 'present' ]; then