08:39:38.752: 0xb5478c00: INFO: hw: ComponentKKT_SP_TCP: ppp - launching script "/usr/local/ppp-pos2kkt/ppp-pos2kkt-start.sh 0 192.168.251.1 192.168.251.2" 08:39:39.061: 0xb5478c00: WARNING: hw: ComponentKKT_SP_TCP: ppp - script "/usr/local/ppp-pos2kkt/ppp-pos2kkt-start.sh 0" failed. At the network already exists 192.168.251.2 or 192.168.251.1 addresses
192.168.15.101#cat /usr/local/ppp-pos2kkt/ppp-pos2kkt-start.sh #!/bin/sh log() { logger -t ukm "ppp-pos2kkt-start[$$]: $*" } ppp_utils_load() { local FILE_PPP_UTILS="/usr/local/ppp-pos2kkt/ppp-utils.sh" log "$FILE_PPP_UTILS - loading ..." . $FILE_PPP_UTILS if [ $? -ne 0 ]; then log "ERROR: Failed to load $FILE_PPP_UTILS" fi log "$FILE_PPP_UTILS - loaded" } ########################################################3 log "--- begin ---" ppp_utils_load params_process $* log "$FILE_PPP_START_INTERNAL - executing via sudo" sudo $FILE_PPP_START_INTERNAL $* RET_CODE=$? log "$FILE_PPP_START_INTERNAL - finished" log "--- end ---" exit $RET_CODE 192.168.15.101#cat ./ppp-pos2kkt-start-internal.sh #!/bin/sh log() { logger -t ukm "ppp-pos2kkt-start-internal[$$]: $*" } ppp_utils_load() { local FILE_PPP_UTILS="/usr/local/ppp-pos2kkt/ppp-utils.sh" log "$FILE_PPP_UTILS - loading ..." . $FILE_PPP_UTILS if [ $? -ne 0 ]; then log "ERROR: Failed to load $FILE_PPP_UTILS" fi log "$FILE_PPP_UTILS - loaded" } ########################################################3 log "--- begin ---" ppp_utils_load params_process $* ppp_wd_check_running if [ $? -ne 0 ]; then # если уже запущено exit 1 else ppp_check_connection $PPP_IP_POS $CHECK_IP_PING_ATTEMPTS if [ $? -eq 0 ]; then # в сети обнаружен "паразит" exit 2 fi ppp_check_connection $PPP_IP_KKT $CHECK_IP_PING_ATTEMPTS if [ $? -eq 0 ]; then # в сети обнаружен "паразит" exit 2 fi ppp_wd_start_bg $* ppp_check_running ppp_check_connection $PPP_IP_KKT $PPP_PING_ATTEMPTS if [ $? -ne 0 ]; then # ккт так и не поднял соединение exit 3 fi fi log "--- end ---" exit 0