BTECH UV PRO - Fixed called to expect script following testing on field system

This commit is contained in:
Gaston Gonzalez
2025-01-03 05:27:12 -07:00
parent 6612b8401c
commit f4d68ab258
+3 -4
View File
@@ -140,9 +140,9 @@ case $1 in
sed -i "s|.*mac.*| \"mac\": \"${MAC}\"|g" ${ACTIVE_RADIO}
# Generate an expect script to automatically pair our device.
PAIR_SCRIPT="/tmp/pair.sh"
PAIR_SCRIPT="${HOME}/pair"
cat <<EOF > $PAIR_SCRIPT
cat <<EOF > ${PAIR_SCRIPT}
#!/usr/bin/expect -f
set device "${MAC}"
@@ -162,8 +162,7 @@ send "exit\r"
expect eof
EOF
chmod 700 ${PAIR_SCRIPT}
${PAIR_SCRIPT}
sleep 1 && chmod 755 ${PAIR_SCRIPT} && expect ${PAIR_SCRIPT}
;;
unpair)