fixed some shell command usage in example files

This commit is contained in:
Blake J. Harnden 2018-02-27 12:39:12 -08:00
parent e35b4a0a4b
commit 78537d8e95
5 changed files with 4 additions and 7 deletions

View file

@ -81,8 +81,7 @@ def main():
print "creating %d nodes with addresses from %s" % \
(options.numnodes, prefix)
for i in xrange(1, options.numnodes + 1):
tmp = session.add_object(cls=nodes.CoreNode, name="n%d" % i,
objid=i)
tmp = session.add_object(cls=nodes.CoreNode, name="n%d" % i, objid=i)
tmp.newnetif(wlan, ["%s/%s" % (prefix.addr(i), prefix.prefixlen)])
tmp.client.cmd([constants.SYSCTL_BIN, "net.ipv4.icmp_echo_ignore_broadcasts=0"])
tmp.setposition(x=150 * i, y=150)
@ -94,7 +93,7 @@ def main():
session.instantiate()
# start a shell on node 1
n[1].term("bash")
n[1].client.term("bash")
print "elapsed time: %s" % (datetime.datetime.now() - start)