The problem lies in line 114 (Puppy 2.17.1):
Code: Select all
read -t ${TRY_DELAY} a
I commented-out line 114 and the following line, as interrupting the loop when run in the background with "Enter" makes no sense, and added this line:
Code: Select all
sleep ${TRY_DELAY}
Code: Select all
if [ "`ifplugstatus${IFVER} ${INTERFACE} | grep "link beat detected"`" = "" ]; then
#read -t ${TRY_DELAY} a
#[ $? -eq 0 ] && TRY_COUNT=${TRY_MAX_COUNT}
#pakt: 'read -t <delay>' doesn't work when rc.network is run as a separate process
sleep ${TRY_DELAY} #use this instead
else
UNPLUGGED='false'
TRY_COUNT=${TRY_MAX_COUNT}
fi
Code: Select all
if [ "`ifplugstatus${IFVER} ${INTERFACE} | grep "link beat detected"`" = "" ]; then
read -t ${TRY_DELAY} a
[ $? -eq 0 ] && TRY_COUNT=${TRY_MAX_COUNT}
else
UNPLUGGED='false'
TRY_COUNT=${TRY_MAX_COUNT}
fi