From a16fae676f8e532ec00c4dd0820ba8f9619b6de5 Mon Sep 17 00:00:00 2001
From: Bob Lantz <rlantz@cs.stanford.edu>
Date: Fri, 5 Mar 2010 17:19:02 -0800
Subject: [PATCH] Tweaks to separate command and options.

---
 examples/sshd.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/sshd.py b/examples/sshd.py
index 298994b6..e244b3ee 100755
--- a/examples/sshd.py
+++ b/examples/sshd.py
@@ -47,13 +47,13 @@ def connectToRootNS( network, switch, ip, prefixLen, routes ):
    for net in routes:
       root.cmd( 'route add -net ' + net + ' dev ' + intf )
 
-def sshd( network, cmd='/usr/sbin/sshd -D' ):
+def sshd( network, cmd='/usr/sbin/sshd', opts='-D' ):
    "Start a network, connect it to root ns, and run sshd on all hosts."
    switch = network.switches[ 0 ] # switch to use
    ip = '10.123.123.1' # our IP address on host network
    routes = [ '10.0.0.0/8' ] # host networks to route to
    connectToRootNS( network, switch, ip, 8, routes )
-   for host in network.hosts: host.cmd( cmd + ' &' )
+   for host in network.hosts: host.cmd( cmd + ' ' + opts + '&' )
    print
    print "*** Hosts are running sshd at the following addresses:"
    print
-- 
GitLab