mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-30 18:07:52 +00:00 
			
		
		
		
	certificates: add a mount_cert helper script
Fixes: WIFI-12461 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
		
							
								
								
									
										15
									
								
								feeds/tip/certificates/files/usr/bin/mount_certs
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								feeds/tip/certificates/files/usr/bin/mount_certs
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,15 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | . /lib/functions.sh | ||||||
|  | mkdir -p /certificates | ||||||
|  | mtd=$(find_mtd_index certificates) | ||||||
|  |  | ||||||
|  | if [ "$(head -c 4 /dev/mtd$mtd)" == "hsqs" ]; then | ||||||
|  | 	mount -t squashfs /dev/mtdblock$mtd /certificates | ||||||
|  | else | ||||||
|  | 	[ -n "$mtd" -a -f /sys/class/mtd/mtd$mtd/oobsize ] && ubiattach -p /dev/mtd$mtd | ||||||
|  | 	if [ -n "$(ubinfo -a | grep certificates)" ]; then | ||||||
|  | 		[ -e /dev/ubi0 ] && mount -t ubifs ubi0:certificates /certificates | ||||||
|  | 		[ -e /dev/ubi1 ] && mount -t ubifs ubi1:certificates /certificates | ||||||
|  | 	fi | ||||||
|  | fi | ||||||
		Reference in New Issue
	
	Block a user
	 John Crispin
					John Crispin