projects
/
openwrt
/
staging
/
jogo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1b58d9c
)
Fix parsing of password option; set timeout for writing.
author
Jose Vasconcellos
<jvasco@verizon.net>
Thu, 15 Jan 2009 22:05:10 +0000
(22:05 +0000)
committer
Jose Vasconcellos
<jvasco@verizon.net>
Thu, 15 Jan 2009 22:05:10 +0000
(22:05 +0000)
SVN-Revision: 14046
scripts/flashing/jungo-image.py
patch
|
blob
|
history
diff --git
a/scripts/flashing/jungo-image.py
b/scripts/flashing/jungo-image.py
index 0630b4a77ec3c33d10a75d5493eba56369d0c205..326a48229a9a0633d9abf60a261efdc8d0019478 100644
(file)
--- a/
scripts/flashing/jungo-image.py
+++ b/
scripts/flashing/jungo-image.py
@@
-150,7
+150,7
@@
def usage():
try:
opts, args = getopt.getopt(sys.argv[1:], "hdf:u:qp:P:s:vVw", \
try:
opts, args = getopt.getopt(sys.argv[1:], "hdf:u:qp:P:s:vVw", \
- ["help", "dump", "file=", "user=", "pass=", "p
roto
=", "proto=",
+ ["help", "dump", "file=", "user=", "pass=", "p
ort
=", "proto=",
"quiet=", "server=", "verbose", "version", "write"])
except getopt.GetoptError:
# print help information and exit:
"quiet=", "server=", "verbose", "version", "write"])
except getopt.GetoptError:
# print help information and exit:
@@
-161,28
+161,28
@@
for o, a in opts:
if o in ("-h", "--help"):
usage()
sys.exit(1)
if o in ("-h", "--help"):
usage()
sys.exit(1)
- if o in ("-V", "--version"):
- print "%s: 0.
7
" % sys.argv[0]
+
el
if o in ("-V", "--version"):
+ print "%s: 0.
8
" % sys.argv[0]
sys.exit(1)
sys.exit(1)
- if o in ("-d", "--no-dump"):
+
el
if o in ("-d", "--no-dump"):
no_dump = 1
no_dump = 1
- if o in ("-f", "--file"):
+
el
if o in ("-f", "--file"):
dumpfile = a
dumpfile = a
- if o in ("-s", "--server"):
+
el
if o in ("-s", "--server"):
server = a
server = a
- if o in ("-u", "--user"):
+
el
if o in ("-u", "--user"):
user = a
user = a
- if o in ("-p", "--pass"):
+
el
if o in ("-p", "--pass"):
password = a
password = a
- if o in ("-P", "--proto"):
+
el
if o in ("-P", "--proto"):
proto = a
proto = a
-
if o in ("--port")
:
- PORT =
a
- if o in ("-w", "--write"):
+
elif o == "--port"
:
+ PORT =
int(a)
+
el
if o in ("-w", "--write"):
write_image = 1
write_image = 1
- if o in ("-q", "--quiet"):
+
el
if o in ("-q", "--quiet"):
verbose = 0
verbose = 0
- if o in ("-v", "--verbose"):
+
el
if o in ("-v", "--verbose"):
verbose = 1
# make sure we have enough arguments
verbose = 1
# make sure we have enough arguments
@@
-252,7
+252,7
@@
if write_image:
print "Writing new image..."
print cmd,
tn.write(cmd)
print "Writing new image..."
print cmd,
tn.write(cmd)
- buf = tn.read_until("Returned 0")
+ buf = tn.read_until("Returned 0"
,10
)
tn.write("exit\n")
tn.close()
tn.write("exit\n")
tn.close()