OpenVoiceOS / ovos-PHAL-plugin-system

Apache License 2.0
0 stars 2 forks source link

factory reset #7

Closed JarbasAl closed 2 years ago

JarbasAl commented 2 years ago

events

AIIX commented 2 years ago

as discussed in chat if we want shell to handle parsing the script we need to add two more settings flags apart from script path, external=true / false and an external bus message to the app (shell here with the script path) if external app handling is true

JarbasAl commented 2 years ago

example plugin integration https://github.com/OpenVoiceOS/ovos-PHAL-plugin-mk1/commit/fa5b5242fa1b3e6fd6cec08ce53b7ffd55a27f50

j1nx commented 2 years ago

Nit-picking here but this is not a real factory reset but more an ovos-core reset.

In my mind a factory reset means, going back to the exact same machine state as freshly flashed.

JarbasAl commented 2 years ago

@j1nx that is plarform dependent, and thats exactly what the bash script is there for, a distro can specify an extra bash script to do platform specific resets, the plugin just ensures the bare minimum is done, eg, for a desktop install

other plugins can also do reset actions, see the mk1 example to reset faceplate hardware

for ovos-buildroot you just need to set the path in mycroft.conf to a buildroot specific reset script. @AIIX in manjaro image wants to completely nuke /home and reinstall packages for example

j1nx commented 2 years ago

Then I thingk I missread the whole code. I thought it is also taking care of deleting things and rebooting. Did not see (still not see) the bash stuff but it is OK. My python still sucks..

For the ovos-buildroot image, a factory reset just means to reboot with a cmdine flag which at pre-init nukes the whole overlayfs system and reboots again. Then everything is back at flash time.

Will reach out later how to implement that later.

(EDIT: This means later on in time when it switches over to grub2 this can also be done from the grub menu similar with rescue mode)