Page 1 of 1

V7.6.13 Linux FAHclient init script status problem

Posted: Wed May 06, 2020 11:59 am
by zepingouin
I had to modify the launch script in /etc/init.d/FAHClient because the status of FAHClient task was wrong.
However, the script execution is correct as FAHClient is running.
OS is Ubuntu 18.04 LTS.

The problem is from the line 123

Code: Select all

pid=$!
This PID seems to have a very short living time, thus the test at line 72 fails

Code: Select all

if ps -hp $pid 2>/dev/null >/dev/null; then
The workaround is to comment some lines from the original code between lines 72 and 76 to bypass this test.

Code: Select all

    while [ "$(log_status)" == "$1" ]; do
        #if ps -hp $pid 2>/dev/null >/dev/null; then
            sleep 1
        #else
            #return 1
        #fi
    done
This way, the status of FAHClient task is correct.