base-files: uci-defaults: do config flush in one shot
Moving a file between tmpfs and other fs is neither faster nor safer, thus no point in doing it in two steps. Use new jshn option to write output directly to file. Originally discussed here: http://lists.openwrt.org/pipermail/openwrt-devel/2017-December/010127.html Signed-off-by: Roman Yeryomin <roman@advem.lv>
This commit is contained in:
		 Roman Yeryomin
					Roman Yeryomin
				
			
				
					committed by
					
						 John Crispin
						John Crispin
					
				
			
			
				
	
			
			
			 John Crispin
						John Crispin
					
				
			
						parent
						
							c0e7ec91a0
						
					
				
				
					commit
					940844e077
				
			| @@ -615,6 +615,5 @@ board_config_update() { | ||||
| } | ||||
|  | ||||
| board_config_flush() { | ||||
| 	json_dump -i > /tmp/.board.json | ||||
| 	mv /tmp/.board.json ${CFG} | ||||
| 	json_dump -i -o ${CFG} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user