Hello.
There are situations when you store some data in RAM disk (for faster access or to avoid flash wear) and this data should be saved to permanent storage when the router is rebooted. Currently, you can only copy the files manually or create a "SafeReboot" script, which will do the job and you need to run it each time before rebooting the router. But you may just forget to do it and it won't work when you update RouterOS using 'Download&Install' for example.
To solve this problem, a system should execute a script each time it's going to reboot or shutdown. So, it will be possible to run the code to save all the data. Important note is that this script should also have a "feedback" from the code to check if it was executed successfully or not. In case there is an error, reboot/shutdown should be aborted. It could be implemented by checking the value of some variable that will be set by the user in the code. For example, let's call it $ExecResult. If it's true, reboot will continue, if false, it will be aborted. If there is some error during execution of the code itself, it should also be aborted. That's how I see it.
Please consider implementing this.