cleanup in __file manifest
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								501fcf36d1
							
						
					
				
			
			
				commit
				
					
						bf60df1a9b
					
				
			
		
					 1 changed files with 4 additions and 17 deletions
				
			
		| 
						 | 
				
			
			@ -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...
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue