Page 12 of 26

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 4:27 pm
by TheTroll
Sure:

# ./99_95_SoftPowerOff.init start
checking /dtv/usb/sda1
checking /dtv/usb/sdb
samyGOso v1.2.5 (c) bugficks 2013-2014, sectroyer 2014-2015
Injecting '/mnt/opt/privateer/usr/libso/libSoftPowerOff.so' resident: '1'
Succeeded.

Then I do (twice, once for off and once for on again)
samyGOrc -p $(pidof exeTV) 152

This is the init file:

Code: Select all

# hist
# cat /mnt/99_95_SoftPowerOff.init 
#!/bin/sh
#
# ? Copyright 1996-2015, zoelechat@SamyGO
#
#
. /dtv/SGO.env

OPTIONS="CMD_ON:/mnt/opt/privateer/usr/bin/cmd_on.sh CMD_OFF:/mnt/opt/privateer/usr/bin/cmd_off.sh"

SODIR=$SYSROOT/opt/privateer/usr/libso                  # D/E only, on F/H environment LIBSO_DIR is used

stop_bootloop()
{
        for USB in /dtv/usb/sd* ; do
                echo "checking $USB"
                [ -e $USB/STOP ] && echo "STOP found. Script exit..." && exit 1
        done
}

case $1 in 
        start)
        stop_bootloop
        [ "$LIBSO_DIR" ] && SODIR=$LIBSO_DIR
        samyGOso -A -B -r -l $SODIR/libSoftPowerOff.so $OPTIONS
        ;;
        stop)
        ;;
        status)
        [ -f /dtv/SoftPowerOff.log ] && cat /dtv/SoftPowerOff.log || echo "Not started"
        ;;
        *)
        echo "Usage: $0 {start|stop|status}" 1>&2
        exit 0
        ;;
esac#

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 4:31 pm
by zoelechat
Well, looking at an older version, it's true that I removed some strncpy, nfi why, let me fix :P

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 4:31 pm
by TheTroll
Ha:) cool, i ll try your fix then!

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 4:37 pm
by zoelechat
Should be good (I guess ;) ). Check first post.

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 4:42 pm
by TheTroll
I have nobody at home anymore to power-on the tv after a hard power off :)
Do you have a remote solution to rehook or reboot to power-on ?

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 4:45 pm
by zoelechat
Not yet, but working on it :)

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 4:47 pm
by TheTroll
Nice :)
Anyway, i ll tell you tonight if you strncpy works!
Thanks

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 5:09 pm
by zoelechat
I may have a clue for hard *reboot* without using micom, but I don't think power ON from full-off will be possible...

Funny that nobody reported issue you encountered, I'm personnally not using forum version(s) so I couldn't notice :)

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 7:28 pm
by TheTroll
Now it works :) thx!

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 7:39 pm
by zoelechat
Cool, thanks for bug detection ;)