[openwrt/openwrt] base-files: fix cleanup after settings restore

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 12 03:17:31 PST 2024


blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/06c2d5524c0d162ac2af5e55b03e217fcb882cf7

commit 06c2d5524c0d162ac2af5e55b03e217fcb882cf7
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Tue Apr 30 08:25:57 2024 -0300

    base-files: fix cleanup after settings restore
    
    Some devices use file '/tmp/sysupgrade.tar' during settings restore and
    this potentially big file was not being cleaned up from RAM afterwards.
    
    See: do_mount_root() (base-files/files/lib/preinit/80_mount_root)
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
    
    Link: https://github.com/openwrt/openwrt/pull/15339
    Signed-off-by: John Crispin <john at phrozen.org>
---
 package/base-files/files/etc/init.d/done | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/base-files/files/etc/init.d/done b/package/base-files/files/etc/init.d/done
index 32d6118df7..77d2721f7d 100755
--- a/package/base-files/files/etc/init.d/done
+++ b/package/base-files/files/etc/init.d/done
@@ -5,6 +5,7 @@ START=95
 boot() {
 	mount_root done
 	rm -f /sysupgrade.tgz && sync
+	rm -f /tmp/sysupgrade.tar && sync
 
 	# process user commands
 	[ -f /etc/rc.local ] && {




More information about the lede-commits mailing list