mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 02:17:58 +00:00 
			
		
		
		
	certificates: change Sonicfi RAP7 series certicate type from squashfs to ext4
Fixes: WIFI-14834 Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
This commit is contained in:
		 wingate5678
					wingate5678
				
			
				
					committed by
					
						 John Crispin
						John Crispin
					
				
			
			
				
	
			
			
			 John Crispin
						John Crispin
					
				
			
						parent
						
							d71b803708
						
					
				
				
					commit
					6c4ca10e74
				
			| @@ -26,16 +26,20 @@ cig,wf672) | |||||||
| 	mmc_dev=$(echo $(find_mmc_part "cert") | sed 's/^.\{5\}//') | 	mmc_dev=$(echo $(find_mmc_part "cert") | sed 's/^.\{5\}//') | ||||||
| 	[ -n "$mmc_dev" ] && mount -t ext4 /dev/$mmc_dev /certificates | 	[ -n "$mmc_dev" ] && mount -t ext4 /dev/$mmc_dev /certificates | ||||||
| 	;; | 	;; | ||||||
| sonicfi,rap7110c-341x) | sonicfi,rap7*) | ||||||
|  | 	if [ "$(board_name)" = "sonicfi,rap7110c-341x" ]; then | ||||||
| 		mmc_dev=$(echo $(find_mmc_part "certificates") | sed 's/^.\{5\}//') | 		mmc_dev=$(echo $(find_mmc_part "certificates") | sed 's/^.\{5\}//') | ||||||
| 	[ -n "$mmc_dev" ] && mount -t squashfs /dev/$mmc_dev /mnt | 		[ -n "$mmc_dev" ] && mount -t ext4 /dev/$mmc_dev /certificates | ||||||
|  | 	else | ||||||
|  | 		mtd=$(find_mtd_index certificates) | ||||||
|  | 		[ -n "$mtd" ] && mount -t ext4 /dev/mtdblock$mtd /certificates | ||||||
|  | 	fi | ||||||
|  | 	if [ ! -f /certificates/cert.pem ] || [ ! -f /certificates/key.pem ]; then | ||||||
| 		bootconfig=$(bootconfig_lookup) | 		bootconfig=$(bootconfig_lookup) | ||||||
| 		if [ -n "$bootconfig" ]; then | 		if [ -n "$bootconfig" ]; then | ||||||
| 			mmc_dev=$(echo $(find_mmc_part "$bootconfig") | sed 's/^.\{5\}//') | 			mmc_dev=$(echo $(find_mmc_part "$bootconfig") | sed 's/^.\{5\}//') | ||||||
| 			[ -n "$mmc_dev" ] && tar xf /dev/$mmc_dev -C /certificates | 			[ -n "$mmc_dev" ] && tar xf /dev/$mmc_dev -C /certificates | ||||||
| 	else | 		fi | ||||||
| 		cp /mnt/* /certificates/ |  | ||||||
| 		umount /mnt |  | ||||||
| 	fi | 	fi | ||||||
| 	;; | 	;; | ||||||
| *) | *) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user