[OpenWrt-Devel] [PATCH] treewide: use new procd sysupgrade $UPGRADE_BACKUP variable
Rafał Miłecki
zajec5 at gmail.com
Thu Sep 5 05:03:52 EDT 2019
On 05.09.2019 09:13, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal at milecki.pl>
>
> It's a variable set by procd that should replace hardcoded
> /tmp/sysupgrade.tgz.
My yesterday explanation & question regarding this work:
[09:44] <rmilecki> i'm planning some cleanups for sysupgrade + handling config backups
[09:44] <rmilecki> right now a lot of code depends on /tmp/sysupgrade.tgz path (hardcoded)
[09:44] <rmilecki> i'd like "sysupgrade" ubus method to pass that path as UPGRADE_BACKUP env variable
[09:44] <rmilecki> then I'd like all relevant generic & targets code to use $UPGRADE_BACKUP
[09:44] <rmilecki> I think it's better than assuming / hardcoding some specific path
[09:44] <rmilecki> any objections to that?
[09:50] <jow> no, its fine
[10:04] <rmilecki> the most tricky part will be about calls like:
[10:04] <rmilecki> cp -af "$CONF_TAR" /mnt/
[10:05] <rmilecki> if we one day decide that $CONF_TAR (or $UPGRADE_BACKUP) can be e.g. /tmp/foobar.tgz then it will result in /mnt/foobar.tgz while some other code expects /mnt/sysupgrade.tgz
[10:05] <rmilecki> nothing impossible to fix
[10:05] <rmilecki> just something to be careful about
[10:06] <jow> well since the tar archive is appended to the filesystem eventually it has to stay on a fixed location
[10:06] <jow> and keep in mind that space (in flash and ram) is scarce, so if the backup is large, we might not be able to affort to copy it
[10:10] <rmilecki> ok
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list