diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index bf30bb2c..ef8c5501 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -23,28 +23,15 @@ destination="/$__object_id" -# Use correct md5sum binary - MacOSx is different here -# FIXME: broken: we don't know the host os! -case "$os" in - macosx) - md5sum="md5" - ;; - - *) - md5sum="md5sum" - ;; -esac - if [ -f "$__object/parameter/source" ]; then source="$(cat "$__object/parameter/source")" if [ -f "$source" ]; then - local_md5sum="$($md5sum < "$source")" - remote_md5sum="$(cat "$__object/explorer/md5sum")" + local_cksum="$(cksum < "$source")" + remote_cksum="$(cat "$__object/explorer/cksum")" - # FIXME: Is md5sum the right approach? - if [ "$local_md5sum" != "$remote_md5sum" ]; then - # FIXME: This is ugly and hardcoded, replace after 1.0! + if [ "$local_cksum" != "$remote_cksum" ]; then + # FIXME: The username is ugly and hardcoded, replace after 1.0! # Probably a better aproach is to have the user configured # ~/.ssh/config to contain the right username # Probably describe it in cdist-quickstart...