Author: blogic
Date: 2015-12-12 08:37:45 +0100 (Sat, 12 Dec 2015)
New Revision: 47879

Modified:
   trunk/package/system/procd/files/nand.sh
Log:
procd: add 'platform_nand_pre_upgrade'

Add 'platform_nand_pre_upgrade' callback to allow platform specific
preparation right before flashinng, when already in ramdisk.

Example uses might be setting correct values for CI_{KERNPART,UBIPART}.

Signed-off-by: Nikolay Martynov <[email protected]>

Modified: trunk/package/system/procd/files/nand.sh
===================================================================
--- trunk/package/system/procd/files/nand.sh    2015-12-12 06:42:29 UTC (rev 
47878)
+++ trunk/package/system/procd/files/nand.sh    2015-12-12 07:37:45 UTC (rev 
47879)
@@ -275,6 +275,10 @@
 nand_do_upgrade_stage2() {
        local file_type=$(identify $1)
 
+       if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then
+               platform_nand_pre_upgrade "$1"
+       fi
+
        [ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs"
 
        case "$file_type" in
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to