Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22

Thread: I still miss the old behavior of init 4

  1. #16
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,780
    Thanks
    237
    Thanked 1,658 Times in 1,306 Posts
    Quote Originally Posted by Huevos View Post
    The old code just halted Enigma without any respect for a proper shutdown.
    What old code did this?
    init should stop a process by sending it a signal. I can't find which, but I'd expect it to be TERM.
    If enigma2 used to just die when sent this than would have been a problem.
    If you want to be able to shut down enigma2 quickly without updating config files then the way to achieve that is to define a specific signal that does that when sent. Such as HUP.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  2. #17

    Title
    Moderator
    Join Date
    Jul 2011
    Location
    germania
    Posts
    5,126
    Thanks
    106
    Thanked 1,434 Times in 1,137 Posts
    Hi,
    may be before you joined this board.

    Ralf
    ---
    Sat:VU+ Ultimo4K/Solo4K/Duo2/2*Solo2/Ultimo
    Remote: Harmony 200, 700, Link, Smart Control, Smart Companion, Elite, 2*Ultimate, Keyboard

  3. #18
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,614
    Thanks
    2,006
    Thanked 4,947 Times in 3,269 Posts
    Quote Originally Posted by birdman View Post
    What old code did this?
    Not sure how long ago. At least 5 years. Code was by Betacentauri.

    Problem Tony ViXed was...

    Restore a back-up... that writes "/etc/enigma2/settings"... then enigma is shut down... that shutdown writes to the settings file. That was breaking certain complicated tuner configs. Even though before the shutdown the new settings file was loaded into enigma there was some bug in the reload, that has never been found, that the new tuner config from the restore was not properly loaded into enigma... so the write back to the settings file lost some of the data. I think now after a backup restore we just kill the enigma process.
    Help keep OpenViX servers online.Please donate!

  4. #19
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,614
    Thanks
    2,006
    Thanked 4,947 Times in 3,269 Posts
    Quote Originally Posted by birdman View Post
    What old code did this?
    init should stop a process by sending it a signal. I can't find which, but I'd expect it to be TERM.
    If enigma2 used to just die when sent this than would have been a problem.
    If you want to be able to shut down enigma2 quickly without updating config files then the way to achieve that is to define a specific signal that does that when sent. Such as HUP.
    Here is the commit...
    https://github.com/OpenViX/enigma2/c...050cd51868efa6
    Help keep OpenViX servers online.Please donate!

  5. The Following User Says Thank You to Huevos For This Useful Post:

    abu baniaz (06-06-20)

  6. #20
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,780
    Thanks
    237
    Thanked 1,658 Times in 1,306 Posts
    Quote Originally Posted by Huevos View Post
    Not sure how long ago. At least 5 years. Code was by Betacentauri.

    Problem Tony ViXed was...

    Restore a back-up... that writes "/etc/enigma2/settings"... then enigma is shut down... that shutdown writes to the settings file.
    I reckon the problem with that is the way the code runs.
    How I would expect a restore to work is:

    1. write a script to do the restore
    2. stop enigma2
    3. run the script
    4. start enigma2 (which will be part of the restore script).


    Alternatively, just have a global flag called no_settings_save_on_shutdown, set it and act on it....
    Relying on behaviour from an unrelated activity is usually fraught with problems.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  7. #21
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,614
    Thanks
    2,006
    Thanked 4,947 Times in 3,269 Posts
    Quote Originally Posted by birdman View Post
    I reckon the problem with that is the way the code runs.
    How I would expect a restore to work is:

    1. write a script to do the restore
    2. stop enigma2
    3. run the script
    4. start enigma2 (which will be part of the restore script).


    Alternatively, just have a global flag called no_settings_save_on_shutdown, set it and act on it....
    Relying on behaviour from an unrelated activity is usually fraught with problems.
    I like idea 2. Can we look at where that is possible?

    With idea 1, if we stop enigma, how do we start the script?
    Help keep OpenViX servers online.Please donate!

  8. #22
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,780
    Thanks
    237
    Thanked 1,658 Times in 1,306 Posts
    Quote Originally Posted by Huevos View Post
    With idea 1, if we stop enigma, how do we start the script?
    enigma2 (the binary) is run from enigma2.sh (the script) and the script checks the exit code.
    It already checks for a half-dozen or so cases.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.