[App] libSoftPowerOff D/E/F/H
Re: [App] libSoftPowerOff D/E/F/H
Well, if I understood correctly (!) you could simply check "your condition" in CMD_OFF script and "sync ; micom shutdown" if true. Is that it?
Shutdown by micom shouldn't cause any problem, except in case TV was recording (recording might be lost).
Shutdown by micom shouldn't cause any problem, except in case TV was recording (recording might be lost).
I do NOT receive any PM. Please use forum.
Re: [App] libSoftPowerOff D/E/F/H
Thank you. I didn't know about the shutdown option of micom. Yes, that would do.
H6400, firmware 2602.2 downgraded to 2130
Re: [App] libSoftPowerOff D/E/F/H
@zoelechat: I've implemented a custom script to run on powerOn that activates LockTV if the time is right. If LockTV had been injected before, it reboots the TV (and a different script would activate on boot).
Here is the code: http://pastebin.com/kePaHqZW
When I run it from shell, it works correctly, but when I run it as an event onPower on it works, but does not inject LockTV. I dug a bit deeper, and it seems the scripts that run onPowerOn/onPowerOff are run as user 1010 (app):
So, what would be the best way to run some commands as root inside the script?
I tried with
The code exits with errorcode 1. Using quotes around the command (after -c) has the same effect.
Here is the code: http://pastebin.com/kePaHqZW
When I run it from shell, it works correctly, but when I run it as an event onPower on it works, but does not inject LockTV. I dug a bit deeper, and it seems the scripts that run onPowerOn/onPowerOff are run as user 1010 (app):
Code: Select all
/mnt/scripts/onPowerOn.sh: Injecting libPinCode because we are on a weekday before 18
/mnt/scripts/onPowerOn.sh: Running as uid=1010(app) gid=1010(app) groups=500(gfx),501(video),502(audio),503(disk),504(security),506(dtvlogd),1010(app)
/mnt/scripts/onPowerOn.sh: Text injection error code:0
/mnt/scripts/onPowerOn.sh: Lock TV injection error code:0
I tried with
Code: Select all
su -c /mnt/opt/privateer/usr/bin/samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libText.so TEXT:'injecting libPinCode to enforce time' FONT:2 CENTER:7 TIMEOUT:5
H6400, firmware 2602.2 downgraded to 2130
Re: [App] libSoftPowerOff D/E/F/H
It's expected on H, any CMD launched by lib (and even by TV) is not as root, you have to use such trick (example in libAirToSat thread IIRC):
Code: Select all
(echo "/mnt/opt/privateer/usr/bin/samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libText.so TEXT:'injecting libPinCode to enforce time' FONT:2 CENTER:7 TIMEOUT:5" ; sleep 2) | /mnt/bin/telnet localhost 23
I do NOT receive any PM. Please use forum.
Re: [App] libSoftPowerOff D/E/F/H
I see. I have disabled telnet since it didn't ask for a password. Now I see it was a feature, not a bug. Perhaps I can start it listening on localhost only. Thanks
Edit: -b does just that...
Edit: -b does just that...
H6400, firmware 2602.2 downgraded to 2130
-
- SamyGO Project Donor
- Posts: 129
- Joined: Mon Nov 07, 2016 12:58 pm
- Location: Poland
- Contact:
Re: [App] libSoftPowerOff D/E/F/H
@zoelechat is there anyway to shutdown AV Receiver using libSoftPowerOFF ? Tryied STB option and it's not working but I probably don't fully understand how it works...
48HU7500 1008 - half rooted by mihd
Re: [App] libSoftPowerOff D/E/F/H
I think STB option is illustrated enough, it's ONLY for RCs having "STB" button (rare but added on request).
Otherwise, unless you can remotely (through network/commandline or so) shutdown your AV receiver: No
Otherwise, unless you can remotely (through network/commandline or so) shutdown your AV receiver: No
I do NOT receive any PM. Please use forum.
-
- SamyGO Project Donor
- Posts: 129
- Joined: Mon Nov 07, 2016 12:58 pm
- Location: Poland
- Contact:
Re: [App] libSoftPowerOff D/E/F/H
Well, do you know how to pull out command from on screen tools menu? There is option to power on or off my AV receiver...
48HU7500 1008 - half rooted by mihd
Re: [App] libSoftPowerOff D/E/F/H
No idea, never seen such option (HDMI-CEC related?)
Possible it could correspond to that famous STB key, but can't tell you which keycode it owns (I don't cheat it by keycode there). You might try keys using samyGOrc until you find it maybe.
Possible it could correspond to that famous STB key, but can't tell you which keycode it owns (I don't cheat it by keycode there). You might try keys using samyGOrc until you find it maybe.
I do NOT receive any PM. Please use forum.
-
- SamyGO Project Donor
- Posts: 129
- Joined: Mon Nov 07, 2016 12:58 pm
- Location: Poland
- Contact:
Re: [App] libSoftPowerOff D/E/F/H
It's not hdmi-cec related as it's disappearing after pluging in hdmi Better leave it as I don't want any bootloops caused with samyGOrc
48HU7500 1008 - half rooted by mihd