|
|
@ -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 |
|
|
|