procd: add helper for starting NAND sysupgrade
authorJohn Crispin <john@openwrt.org>
Thu, 9 Apr 2015 14:33:11 +0000 (14:33 +0000)
committerJohn Crispin <john@openwrt.org>
Thu, 9 Apr 2015 14:33:11 +0000 (14:33 +0000)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 45339

package/system/procd/files/nand.sh

index 7fb9343c954556ba0cd9f0a0f089ad2773733b88..0ed1b632d5a3ecc0299d3f8da853191c453d3bb4 100644 (file)
@@ -353,3 +353,12 @@ nand_do_platform_check() {
 
        return 0
 }
+
+# Start NAND upgrade process
+#
+# $(1): file to be used for upgrade
+nand_do_upgrade() {
+       echo -n $1 > /tmp/sysupgrade-nand-path
+       cp /sbin/upgraded /tmp/
+       nand_upgrade_stage1
+}