Jelajahi Sumber

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 <[email protected]>

Link: https://github.com/openwrt/openwrt/pull/15339
Signed-off-by: John Crispin <[email protected]>
Rodrigo Balerdi 1 tahun lalu
induk
melakukan
06c2d5524c
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      package/base-files/files/etc/init.d/done

+ 1 - 0
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 ] && {