openwrt/package/base-files/files/etc/init.d/done
Rodrigo Balerdi 06c2d5524c 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@gmail.com>

Link: https://github.com/openwrt/openwrt/pull/15339
Signed-off-by: John Crispin <john@phrozen.org>
2024-12-12 11:01:56 +01:00

19 lines
298 B
Bash
Executable File

#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=95
boot() {
mount_root done
rm -f /sysupgrade.tgz && sync
rm -f /tmp/sysupgrade.tar && sync
# process user commands
[ -f /etc/rc.local ] && {
sh /etc/rc.local
}
# set leds to normal state
. /etc/diag.sh
set_state done
}