Thursday, 5 September 2013

shell script error on mips architecture (bin/sh)

shell script error on mips architecture (bin/sh)

#!/bin/sh
print_usage ()
{
echo "usage: $0 [COMMAND]"
}
if [ $# -ne 1 ]; then
echo "error: missing argument" 1>&2
print_usage
exit 255
fi
COMMAND=$1
STATE_FILE =qmi-network-state
PROFILE_FILE =agqmi-network.conf
load_state ()
{
if [ -f "$STATE_FILE" ]; then
echo "Loading previous state..."
>>$LOG
CID=`cat qmi-network-state | grep 'CID' | awk '{print $1}' | cut
-f2 -d"'"`
PDH=`cat qmi-network-state | grep 'PDH' | awk '{print $1}' | cut
-f2 -d"'"`
fi
}
load_state
case $COMMAND in
"start")
start_network
;;
"stop")
stop_network
;;
*)
echo "error: unexpected command '$COMMAND'" 1>&2
print_usage
exit 255
;;
esac
exit 0
I have above script executing in mips based board. which i composed in
ubuntu #!/bin/bash. I am getting following errors when i start i need to
pass ./agqmi-network start.
error:
# ./agqmi-network start
./agqmi-network: line 137: can't create : nonexistent directory
./agqmi-network: line 137: can't create : nonexistent directory
./agqmi-network: line 137: can't create : nonexistent directory
Can anybody help me please???

No comments:

Post a Comment