system: make factory reset a bit more thorough

Suggested by: Markus Stubbig
This commit is contained in:
Franco Fichtner 2018-04-12 06:35:53 +00:00
parent 0bfe55cab2
commit a528a9ffeb

View File

@ -1382,13 +1382,9 @@ function system_login_configure($verbose = false)
exec('/bin/kill -HUP 1');
}
/****f* config/reset_factory_defaults
* NAME
* reset_factory_defaults - Reset the system to its default configuration.
******/
function reset_factory_defaults($sync = true)
{
mwexec('/bin/rm -r /conf/*');
mwexec('/bin/rm -fr /conf/* /var/log/* /root/.history');
disable_security_checks();
mwexec('/usr/local/sbin/beep.sh stop');