openwrt/package/base-files/files/lib/upgrade
Daniel Golle 5c10f26c28 sysupgrade-nand: allow limiting rootfs_data by setting env variable
Check if firmware environment variable 'rootfs_data_max' exists and is
set to a numerical value greater than 0. If so, limit rootfs_data
volume to that size instead of using the maximum available size.

This is useful on devices with lots of flash where users may want to
have eg. a volume for persistent logs and statistics or for external
applications/containers. Persistence on rootfs overlay is limited by
the size of memory available during the sysugprade process as that
data needs to be copied to RAM while the volume is being recreated
during sysupgrade. Hence it is unsuitable for keeping larger amounts
of data accross upgrade which makes additional volume(s) for
application data desirable.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-24 01:35:20 +00:00
..
keep.d base-files: Add /etc/shinit for non-login shell init 2020-03-01 21:35:59 +01:00
common.sh treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
do_stage2 treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup 2019-09-11 09:05:35 +02:00
fwtool.sh base-files: upgrade: fwtool.sh: rewording logs 2020-11-11 21:29:55 +08:00
nand.sh sysupgrade-nand: allow limiting rootfs_data by setting env variable 2021-02-24 01:35:20 +00:00
stage2 base-files: flush kernel memory cache during sysupgrade 2020-12-22 18:59:10 +01:00