handle parameter --state explicilty to respect defaults
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								f165b5611e
							
						
					
				
			
			
				commit
				
					
						14dee79a9b
					
				
			
		
					 2 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# 2011 Steven Armstrong (steven-cdist at armstrong.cc)
 | 
					# 2011-2013 Steven Armstrong (steven-cdist at armstrong.cc)
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This file is part of cdist.
 | 
					# This file is part of cdist.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
| 
						 | 
					@ -44,10 +44,12 @@ else
 | 
				
			||||||
   esac
 | 
					   esac
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set -- "$@" "$__object_id"
 | 
					state="$(cat "$__object/parameter/state")"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set -- "$@" "$__object_id" "--state" "$state"
 | 
				
			||||||
cd "$__object/parameter"
 | 
					cd "$__object/parameter"
 | 
				
			||||||
for property in $(ls .); do
 | 
					for property in $(ls .); do
 | 
				
			||||||
   if [ "$property" != "type" ]; then
 | 
					   if [ "$property" != "type" -a "$property" != "state" ]; then
 | 
				
			||||||
      set -- "$@" "--$property" "$(cat "$property")"
 | 
					      set -- "$@" "--$property" "$(cat "$property")"
 | 
				
			||||||
   fi
 | 
					   fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										1
									
								
								cdist/conf/type/__package/parameter/default/state
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								cdist/conf/type/__package/parameter/default/state
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					present
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue