__config_file: Fix onchange command not being executed (#596)
When a config file state changes from present to absent, onchange command was not being run. Fixes #595.
This commit is contained in:
		
					parent
					
						
							
								4fc72908d8
							
						
					
				
			
			
				commit
				
					
						aec63d42f1
					
				
			
		
					 1 changed files with 0 additions and 7 deletions
				
			
		|  | @ -19,16 +19,9 @@ | |||
| # | ||||
| 
 | ||||
| destination="$__object_id" | ||||
| state="$(cat "$__object/parameter/state")" | ||||
| 
 | ||||
| if [ "$state" = "absent" ]; then | ||||
|    # nothing to do | ||||
|    exit 0 | ||||
| fi | ||||
| 
 | ||||
| if [ -f "$__object/parameter/onchange" ]; then | ||||
|    if grep -q "^__file/${destination}" "$__messages_in"; then | ||||
|       cat "$__object/parameter/onchange" | ||||
|    fi | ||||
| fi | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue