summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
692c6d9)
Move uqmi std and error output on commands without using them to /dev/null.
This will remove useless outputs in the syslog.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
mnc=${plmn:3}
echo "Setting PLMN to $plmn"
fi
mnc=${plmn:3}
echo "Setting PLMN to $plmn"
fi
- uqmi -s -d "$device" --set-plmn --mcc "$mcc" --mnc "$mnc" || {
+ uqmi -s -d "$device" --set-plmn --mcc "$mcc" --mnc "$mnc" > /dev/null 2>&1 || {
echo "Unable to set PLMN"
proto_notify_error "$interface" PLMN_FAILED
proto_block_restart "$interface"
echo "Unable to set PLMN"
proto_notify_error "$interface" PLMN_FAILED
proto_block_restart "$interface"
}
# Cleanup current state if any
}
# Cleanup current state if any
- uqmi -s -d "$device" --stop-network 0xffffffff --autoconnect
+ uqmi -s -d "$device" --stop-network 0xffffffff --autoconnect > /dev/null 2>&1
- uqmi -s -d "$device" --set-data-format 802.3
- uqmi -s -d "$device" --wda-set-data-format 802.3
+ uqmi -s -d "$device" --set-data-format 802.3 > /dev/null 2>&1
+ uqmi -s -d "$device" --wda-set-data-format 802.3 > /dev/null 2>&1
dataformat="$(uqmi -s -d "$device" --wda-get-data-format)"
if [ "$dataformat" = '"raw-ip"' ]; then
dataformat="$(uqmi -s -d "$device" --wda-get-data-format)"
if [ "$dataformat" = '"raw-ip"' ]; then
echo "Y" > /sys/class/net/$ifname/qmi/raw_ip
fi
echo "Y" > /sys/class/net/$ifname/qmi/raw_ip
fi
- uqmi -s -d "$device" --sync
+ uqmi -s -d "$device" --sync > /dev/null 2>&1
echo "Waiting for network registration"
while uqmi -s -d "$device" --get-serving-system | grep '"searching"' > /dev/null; do
echo "Waiting for network registration"
while uqmi -s -d "$device" --get-serving-system | grep '"searching"' > /dev/null; do
- [ -n "$modes" ] && uqmi -s -d "$device" --set-network-modes "$modes"
+ [ -n "$modes" ] && uqmi -s -d "$device" --set-network-modes "$modes" > /dev/null 2>&1
echo "Starting network $interface"
echo "Starting network $interface"
- uqmi -s -d "$device" --set-client-id wds,"$cid_4" --set-ip-family ipv4 > /dev/null
+ uqmi -s -d "$device" --set-client-id wds,"$cid_4" --set-ip-family ipv4 > /dev/null 2>&1
pdh_4=$(uqmi -s -d "$device" --set-client-id wds,"$cid_4" \
--start-network \
pdh_4=$(uqmi -s -d "$device" --set-client-id wds,"$cid_4" \
--start-network \
# pdh_4 is a numeric value on success
if ! [ "$pdh_4" -eq "$pdh_4" ] 2> /dev/null; then
echo "Unable to connect IPv4"
# pdh_4 is a numeric value on success
if ! [ "$pdh_4" -eq "$pdh_4" ] 2> /dev/null; then
echo "Unable to connect IPv4"
- uqmi -s -d "$device" --set-client-id wds,"$cid_4" --release-client-id wds
+ uqmi -s -d "$device" --set-client-id wds,"$cid_4" --release-client-id wds > /dev/null 2>&1
proto_notify_error "$interface" CALL_FAILED
return 1
fi
proto_notify_error "$interface" CALL_FAILED
return 1
fi
connstat=$(uqmi -s -d "$device" --get-data-status)
[ "$connstat" == '"connected"' ] || {
echo "No data link!"
connstat=$(uqmi -s -d "$device" --get-data-status)
[ "$connstat" == '"connected"' ] || {
echo "No data link!"
- uqmi -s -d "$device" --set-client-id wds,"$cid_4" --release-client-id wds
+ uqmi -s -d "$device" --set-client-id wds,"$cid_4" --release-client-id wds > /dev/null 2>&1
proto_notify_error "$interface" CALL_FAILED
return 1
}
proto_notify_error "$interface" CALL_FAILED
return 1
}
- uqmi -s -d "$device" --set-client-id wds,"$cid_6" --set-ip-family ipv6 > /dev/null
+ uqmi -s -d "$device" --set-client-id wds,"$cid_6" --set-ip-family ipv6 > /dev/null 2>&1
pdh_6=$(uqmi -s -d "$device" --set-client-id wds,"$cid_6" \
--start-network \
pdh_6=$(uqmi -s -d "$device" --set-client-id wds,"$cid_6" \
--start-network \
# pdh_6 is a numeric value on success
if ! [ "$pdh_6" -eq "$pdh_6" ] 2> /dev/null; then
echo "Unable to connect IPv6"
# pdh_6 is a numeric value on success
if ! [ "$pdh_6" -eq "$pdh_6" ] 2> /dev/null; then
echo "Unable to connect IPv6"
- uqmi -s -d "$device" --set-client-id wds,"$cid_6" --release-client-id wds
+ uqmi -s -d "$device" --set-client-id wds,"$cid_6" --release-client-id wds > /dev/null 2>&1
proto_notify_error "$interface" CALL_FAILED
return 1
fi
proto_notify_error "$interface" CALL_FAILED
return 1
fi
connstat=$(uqmi -s -d "$device" --get-data-status)
[ "$connstat" == '"connected"' ] || {
echo "No data link!"
connstat=$(uqmi -s -d "$device" --get-data-status)
[ "$connstat" == '"connected"' ] || {
echo "No data link!"
- uqmi -s -d "$device" --set-client-id wds,"$cid_6" --release-client-id wds
+ uqmi -s -d "$device" --set-client-id wds,"$cid_6" --release-client-id wds > /dev/null 2>&1
proto_notify_error "$interface" CALL_FAILED
return 1
}
proto_notify_error "$interface" CALL_FAILED
return 1
}