mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
BTECH UV PRO - Fixed called to expect script following testing on field system
This commit is contained in:
@@ -140,9 +140,9 @@ case $1 in
|
|||||||
sed -i "s|.*mac.*| \"mac\": \"${MAC}\"|g" ${ACTIVE_RADIO}
|
sed -i "s|.*mac.*| \"mac\": \"${MAC}\"|g" ${ACTIVE_RADIO}
|
||||||
|
|
||||||
# Generate an expect script to automatically pair our device.
|
# 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
|
#!/usr/bin/expect -f
|
||||||
|
|
||||||
set device "${MAC}"
|
set device "${MAC}"
|
||||||
@@ -162,8 +162,7 @@ send "exit\r"
|
|||||||
expect eof
|
expect eof
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chmod 700 ${PAIR_SCRIPT}
|
sleep 1 && chmod 755 ${PAIR_SCRIPT} && expect ${PAIR_SCRIPT}
|
||||||
${PAIR_SCRIPT}
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
unpair)
|
unpair)
|
||||||
|
|||||||
Reference in New Issue
Block a user