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 1 of 2 12 LastLast
Results 1 to 15 of 22

Thread: I still miss the old behavior of init 4

  1. #1

    Title
    Moderator
    Join Date
    Jul 2011
    Location
    germania
    Posts
    5,122
    Thanks
    106
    Thanked 1,434 Times in 1,137 Posts

    I still miss the old behavior of init 4

    Hi,
    I still miss the old behavior of init 4 which simply killed E2. I can do the same with kill -9 id-of-enigma2. killall enigma2 does not work I think. Is there a way to put this in a shell script? I can look with PS-A | grep enigma2 but how do I get the id extracted?

    I want a script which looks like that:
    init 4
    kill enigma
    init 3

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

  2. #2
    twol's Avatar
    Title
    Moderator
    Join Date
    Apr 2012
    Posts
    8,382
    Thanks
    987
    Thanked 2,888 Times in 2,243 Posts
    Quote Originally Posted by Trial View Post
    Hi,
    I still miss the old behavior of init 4 which simply killed E2. I can do the same with kill -9 id-of-enigma2. killall enigma2 does not work I think. Is there a way to put this in a shell script? I can look with PS-A | grep enigma2 but how do I get the id extracted?

    I want a script which looks like that:
    init 4
    kill enigma
    init 3

    Ralf
    I think killall -9 enigma2 works fine.... has done for me in past.
    Gigablue Quad 4K & UE 4K
    .........FBC Tuners:
    ------------------> DUR-Line DCR 5-1-8-L4 Multiswitch to 1.5M dish(28.2E)
    ------------------> Spaun SUS 5581/33 NFA Multiswitch to 80 cm dish(19.2E)
    .......................> FBC & DVB-S2X into 90cm dish (27.5W) Opticum robust Unicable LNB
    AX HD61, Edision Osmio 4K+, Zgemma H9Combo, Octagon SF8008 , gbtrio4k, h9se using Legacy ports on multiswitches
    Zgemma H9 C/S into Giga4K

  3. The Following User Says Thank You to twol For This Useful Post:

    Andy_Hazza (02-06-20)

  4. #3
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,769
    Thanks
    235
    Thanked 1,656 Times in 1,305 Posts
    Quote Originally Posted by Trial View Post
    Hi,
    I still miss the old behavior of init 4 which simply killed E2.
    Still works for me:
    Code:
    [et8000]: ps -ef | grep enigma2
    root       828     1  0 14:09 ?        00:00:00 /bin/sh /usr/bin/enigma2.sh
    root       839   828 19 14:09 ?        00:00:18 /usr/bin/enigma2
    root       947   896  0 14:11 pts/0    00:00:00 grep enigma2
    [et8000]: init 4
    [et8000]: ps -ef | grep enigma2
    root       956   896  0 14:11 pts/0    00:00:00 grep enigma2
    (And it still works on a Kubuntu 2.0.4 system to stop the GUI, even though it doesn't use SYSVInit but rather systemd).
    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

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

    ccs (02-06-20)

  6. #4

    Title
    Moderator
    Join Date
    Jul 2011
    Location
    germania
    Posts
    5,122
    Thanks
    106
    Thanked 1,434 Times in 1,137 Posts
    Hi,
    I did not test killall -9 enigma2. I think I only tried killall enigma2 then it complained about missing id. I check later.

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

  7. #5
    Ev0's Avatar
    Title
    V.I.P
    Join Date
    Jan 2011
    Posts
    1,043
    Thanks
    346
    Thanked 421 Times in 262 Posts
    Try init 2


  8. #6
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,769
    Thanks
    235
    Thanked 1,656 Times in 1,305 Posts
    Quote Originally Posted by Trial View Post
    I can do the same with kill -9 id-of-enigma2.
    Sending -9 as a signal is a bad idea.
    It kills the process dead, rather than letting it shutdown (and save things that it normally leaves until shutdown to update).
    -TERM (the default) would be better.
    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

  9. #7

    Title
    Moderator
    Join Date
    Jul 2011
    Location
    germania
    Posts
    5,122
    Thanks
    106
    Thanked 1,434 Times in 1,137 Posts
    Hi,
    first of all killall -9 seems to work. I will also try init 2.

    @birdman,
    I know that it is not the bad idea but I have sometimes the case with endless spinner when I do something in the internet and init 4, init 3 cannot cure the problem. Donīt tell me that you havenīt had this problem in the last years after the changed behavior. It is only an emergency tool for me. Init 4 and reboot is not better in this situation.

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

  10. #8
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,769
    Thanks
    235
    Thanked 1,656 Times in 1,305 Posts
    Quote Originally Posted by Trial View Post
    ..but I have sometimes the case with endless spinner when I do something in the internet and init 4, init 3 cannot cure the problem. Donīt tell me that you havenīt had this problem in the last years after the changed behavior.
    Not sure that init 4 would ever have stopped an endless spinner.
    And I don't know of any particular behaviour change.

    I was just saying that you should try a kill -TERM before resorting to a kill -KILL.
    Init 4 and reboot is not better in this situation.
    If you're going to reboot then the init 4 is superfluous.
    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

  11. #9

    Title
    Moderator
    Join Date
    Jul 2011
    Location
    germania
    Posts
    5,122
    Thanks
    106
    Thanked 1,434 Times in 1,137 Posts
    Hi birdman,
    the behavior was changed 4-5-6-7 years ago. I do not know exactly anymore.

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

  12. #10
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,335
    Thanks
    6,421
    Thanked 9,146 Times in 6,224 Posts
    Trial is right, it changed to allow a graceful shut down to allow processes to complete.

    "init 4" then "init 6" still works for a reboot if init 4/3 does not

  13. #11
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,769
    Thanks
    235
    Thanked 1,656 Times in 1,305 Posts
    Quote Originally Posted by abu baniaz View Post
    Trial is right, it changed to allow a graceful shut down to allow processes to complete.
    reboot would try to do that.
    And init 4 should stop enigma2 if it can, as that only runs in level 3, but leave the system up.
    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

  14. #12
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,573
    Thanks
    2,004
    Thanked 4,924 Times in 3,259 Posts
    Quote Originally Posted by birdman View Post
    reboot would try to do that.
    And init 4 should stop enigma2 if it can, as that only runs in level 3, but leave the system up.
    Yes, but if enigma freezes or there is an endless spinner "init 4" will not force enigma to close. Previously "init 4" just killed the enigma process without any respect to properly saving settings, etc.
    Help keep OpenViX servers online.Please donate!

  15. #13
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,769
    Thanks
    235
    Thanked 1,656 Times in 1,305 Posts
    Quote Originally Posted by Huevos View Post
    Yes, but if enigma freezes or there is an endless spinner "init 4" will not force enigma to close. Previously "init 4" just killed the enigma process without any respect to properly saving settings, etc.
    Possibly. But init 4 just instructs the init process to move to run level 4.
    This could be a change to init, or could be a change to enigma2 to ignore whatever signals init sends to tell it to stop.

    Either way, an endless spinner is a bug in enigma2, so any init difference is a secondary concern.
    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

  16. #14
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,573
    Thanks
    2,004
    Thanked 4,924 Times in 3,259 Posts
    Quote Originally Posted by birdman View Post
    Either way, an endless spinner is a bug in enigma2, so any init difference is a secondary concern.
    Gordon, I think you are missing the point. Yes, the problem is a bug causes the endless spinner. And, yes, Enigma should be closed down properly. But this wasn't always the case. The old code just halted Enigma without any respect for a proper shutdown. This meant it was easy to break out of an Enigma lock-up without needing to reboot the box.

    Also, this "proper shutdown" means it is impossible for the Enigma process or plugins, etc, to overwrite system files and then call an Enigma restart without the desired changes being overwritten by the shutdown process. This was a big problem with restoring certain complicated tuner configs until Twol made changes to the restore process (which now just kills Enigma).
    Help keep OpenViX servers online.Please donate!

  17. #15

    Title
    Moderator
    Join Date
    Jul 2011
    Location
    germania
    Posts
    5,122
    Thanks
    106
    Thanked 1,434 Times in 1,137 Posts
    Hi,
    you are all right. But as Huevos said no code is really perfect. As I said I mostly have the problem with streaming.

    My problem seems solved. killall -9 enigma2 seems to work. I write some scripts:

    #!/bin/sh
    /sbin/init 4
    /usr/bin/killall -9 enigma2
    /sbin/init 3
    sleep 40s
    wget http://127.0.0.1/web/powerstate?newstate=4
    and while I am there also

    #!/bin/sh
    /sbin/init 4
    cp -rf /etc /media/autofs/Backup/Enigma2/$HOSTNAME
    echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
    opkg update
    echo "Upgrade\r" > /media/autofs/Backup/Enigma2/$HOSTNAME/upgrade.txt
    date >> /media/autofs/Backup/Enigma2/$HOSTNAME/upgrade.txt
    opkg -V1 upgrade >> /media/autofs/Backup/Enigma2/$HOSTNAME/upgrade.txt
    /sbin/reboot
    I call this scripts with ssh and put these commands on a button of my Neeo remote. Now upgrade and restart is only a push button away:-)

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

  18. The Following 2 Users Say Thank You to Trial For This Useful Post:

    Andy_Hazza (06-06-20),Willo3092 (06-06-20)

Page 1 of 2 12 LastLast

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.