myrestore.sh (openATV) like script after flashing

There are 10 replies in this Thread which was already clicked 1,240 times. The last Post () by gorski.

  • Hi,


    I'm totally new to PurE2 and really like it so far (after x years with openATV).


    With openATV I was able to add a file named myrestore.sh in /media/hdd/config/ - an everything in there was executed directly after/while flashing a new update (flashing online).

    This way I flashed an update of the image 'naked' and in that myrestore.sh file I added my opkg install lines for my plugins, added some aliases, deleted unneeded languages, ....


    Is such a "execute script file after flashing" way also possible with PurE2?


    Thanks

  • W@Rp

    Approved the thread.
  • In PurE2 section there is a thread about flashing and restoring one's settings...


    Backup/restore your PurE2 settings


    Read all the STICKIES in our section, is my advice for a starter....


    Just don't look at PurE2 as any other image... ;)


    Welcome to the fold!

    "Enlightenment is man's emergence from his self-incurred immaturity. Immaturity is the inability to use one's own understanding without the guidance of another. This immaturity is self-incurred if its cause is not lack of understanding, but lack of resolution and courage to use it without the guidance of another. The motto of enlightenment is therefore: Sapere aude! Have courage to use your own understanding!"


    http://www.columbia.edu/acis/ets/CCREAD/etscc/kant.html

  • gorski I'm not 'a newbie' ;) - so your hint with backup/restore is well known but this doesn't cover my question, do it?


    You mean this line correct?

    Quote

    2) During the Wizard/first run and setup of PurE2, normally one would be offered to restore the settings. Usually it will be done in 2 stages - settings first, then Plugins/addons later. Just say "Yes"!

    That's ok in order to have my settings (and used plugins) back after a flash - but what I meant by this "myrestore.sh" file is - in this file I could write all my other needed things/commands (settings aliases, adding cronjobs, deleting not needed language files are only two simple examples).

    And with openATV this file (/media/hdd/config/myrestore.sh) was found and executed in the flash process automatically.


    My question was if such a 'feature' is present in PurE2 - if not this would be nice to have imho...


    Sure it's not a big problem to flash a new image and restore the settings/plugins like mentioned above and after everything is flashed/restored and enigma2 is up/running I open a console and execute my bash script and do another restart.

  • Cool! Can you write one, please?


    The other one is great for me...


    And most users...

    "Enlightenment is man's emergence from his self-incurred immaturity. Immaturity is the inability to use one's own understanding without the guidance of another. This immaturity is self-incurred if its cause is not lack of understanding, but lack of resolution and courage to use it without the guidance of another. The motto of enlightenment is therefore: Sapere aude! Have courage to use your own understanding!"


    http://www.columbia.edu/acis/ets/CCREAD/etscc/kant.html

  • I suppose you saw this: MENU > pManager > Scripts > User scripts > start a script...


    So, if you have it, I suppose you could put it in here and try:


    ea1d52567bf85bf196618b.png


    Do tell if it works as you need it to, please...


    20635253afd78a76f8d2204.png

    "Enlightenment is man's emergence from his self-incurred immaturity. Immaturity is the inability to use one's own understanding without the guidance of another. This immaturity is self-incurred if its cause is not lack of understanding, but lack of resolution and courage to use it without the guidance of another. The motto of enlightenment is therefore: Sapere aude! Have courage to use your own understanding!"


    http://www.columbia.edu/acis/ets/CCREAD/etscc/kant.html

  • Btw, tromo, FrancHR and terrajoe are your guys, for the script of this kind - deffo not me, as I am not a coder... ;)

    "Enlightenment is man's emergence from his self-incurred immaturity. Immaturity is the inability to use one's own understanding without the guidance of another. This immaturity is self-incurred if its cause is not lack of understanding, but lack of resolution and courage to use it without the guidance of another. The motto of enlightenment is therefore: Sapere aude! Have courage to use your own understanding!"


    http://www.columbia.edu/acis/ets/CCREAD/etscc/kant.html

  • yes, that's it - I can put my script in their and can execute it with the RCU :thumbup:


    The only 'problem' is everything I put in this folder (/usr/script/) is gone after a flash, isn't it?

    EDIT: I can add my script file(s) from /usr/script/ to the "to be saved files" in software management > advanced options

    But the 'automatic processing' directly while flashing is still not possible - I have to execute the script with the RCU (or terminal) and do a another restart of the receiver.


    I know it sounds petty (takes ~5 minutes and one restart more) but if that also could be automate (like it's done with the myrestore.sh approach - see oATV git) - it would be great.


    See it as a featrue request from a happy new PurE2 user which comes from a ~5 year openATV usage who got used to the myrestore.sh script approach ;)

    Edited 2 times, last by jagg ().

  • You only need it once, non? ;) So what if it disappears after reboot - if the plugin is successful?


    On the other hand....


    During installation Wizard you have to press the blue button (you'll see it in German) to delete all other languages...


    After that, one can put in a few bits that perhaps are not renewed...


    If you know where these files are, where these tasks are - save them in Settings file and restore during the restoration process... Have you actually tried it?


    I restore all my settings, including all the intricate FNC plugins settings...


    OK, not absolutely everything in all other plugins/whole setup is restored - but 99% is, ergo... shouldn't be too difficult without it...


    Btw, I am told that these recipes are different for PurE2 v. 6.3 than for 6.5 and other complications, which is why it was removed.....

    "Enlightenment is man's emergence from his self-incurred immaturity. Immaturity is the inability to use one's own understanding without the guidance of another. This immaturity is self-incurred if its cause is not lack of understanding, but lack of resolution and courage to use it without the guidance of another. The motto of enlightenment is therefore: Sapere aude! Have courage to use your own understanding!"


    http://www.columbia.edu/acis/ets/CCREAD/etscc/kant.html

  • well, pure2 team could perhaps have a situation where it checks for user scripts at a custom location eg hdd, then have them executed at first boot if for instance the scripts are named in a particular way to avoid them being executed at every boot. While other scripts therein can continue to be operated as currently setup.


    This I say would be an awesome tweak to existing setup

  • This is way down on the list of priorities... We're a small team and just can't find the time to do it all....


    Moreover, it's creating problems in various versions, as I said, so....

    "Enlightenment is man's emergence from his self-incurred immaturity. Immaturity is the inability to use one's own understanding without the guidance of another. This immaturity is self-incurred if its cause is not lack of understanding, but lack of resolution and courage to use it without the guidance of another. The motto of enlightenment is therefore: Sapere aude! Have courage to use your own understanding!"


    http://www.columbia.edu/acis/ets/CCREAD/etscc/kant.html

PurE2 Team Images Support Forum ~ based on OE-Alliance

PurE2 Supported Models ~

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!