mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 01:22:25 +00:00
26 lines
503 B
Bash
Executable File
26 lines
503 B
Bash
Executable File
#!/bin/sh
|
|
|
|
bootconfig_lookup() {
|
|
bootconfig="$(fw_printenv -n cert_part)"
|
|
case "$(fw_printenv -n cert_part)" in
|
|
0) echo "0:BOOTCONFIG1"
|
|
bootconfig=1
|
|
;;
|
|
*) echo "0:BOOTCONFIG"
|
|
bootconfig=0
|
|
;;
|
|
esac
|
|
fw_setenv cert_part $bootconfig
|
|
}
|
|
|
|
. /lib/functions.sh
|
|
case "$(board_name)" in
|
|
sonicfi,rap7110c-341x)
|
|
cd /certificates
|
|
tar cf /tmp/certs.tar
|
|
bootconfig=$(bootconfig_lookup)
|
|
mmc_dev=$(echo $(find_mmc_part $bootconfig) | sed 's/^.\{5\}//')
|
|
dd if=/tmp/certs.tar of=/dev/$bootconfig
|
|
;;
|
|
esac
|