forked from ungleich-public/cdist
		
	create tmpfile on same volume as existing file
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								8a7639c191
							
						
					
				
			
			
				commit
				
					
						d166224e68
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -47,7 +47,7 @@ remove_entry() {
 | 
				
			||||||
   prefix="#cdist:$__object_name"
 | 
					   prefix="#cdist:$__object_name"
 | 
				
			||||||
   suffix="#/cdist:$__object_name"
 | 
					   suffix="#/cdist:$__object_name"
 | 
				
			||||||
   cat << DONE
 | 
					   cat << DONE
 | 
				
			||||||
tmpfile=\$(mktemp)
 | 
					tmpfile=\$(mktemp ${file}.cdist.XXXXXXXXXX)
 | 
				
			||||||
# preserve ownership and permissions by copying existing file over tmpfile
 | 
					# preserve ownership and permissions by copying existing file over tmpfile
 | 
				
			||||||
cp -p "$file" "\$tmpfile"
 | 
					cp -p "$file" "\$tmpfile"
 | 
				
			||||||
awk -v prefix="$prefix" -v suffix="$suffix" '
 | 
					awk -v prefix="$prefix" -v suffix="$suffix" '
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue