node shell: remove unnecessary -m and unset HISTFILE

Since we already disable job notification with +m, it doesn't
make sense to set it in the original invocation!

It's also annoying if all of the host commands end up overwriting
your regular bash_history!!
This commit is contained in:
Bob Lantz
2015-02-03 22:02:29 -08:00
parent b2fe0778dc
commit d90a45514f
+4 -3
View File
@@ -125,11 +125,11 @@ class Node( object ):
opts = '-cd' if mnopts is None else mnopts
if self.inNamespace:
opts += 'n'
# bash -m: enable job control, i: force interactive
# bash -i: force interactive
# -s: pass $* to shell, and make process easy to find in ps
# prompt is set to sentinel chr( 127 )
cmd = [ 'mnexec', opts, 'env', 'PS1=' + chr( 127 ),
'bash', '--norc', '-mis', 'mininet:' + self.name ]
'bash', '--norc', '-is', 'mininet:' + self.name ]
# Spawn a shell subprocess in a pseudo-tty, to disable buffering
# in the subprocess and insulate it from signals (e.g. SIGINT)
# received by the parent
@@ -157,7 +157,8 @@ class Node( object ):
break
self.pollOut.poll()
self.waiting = False
self.cmd( 'stty -echo; set +m' )
# +m: disable job control notification
self.cmd( 'unset HISTFILE; stty -echo; set +m' )
def mountPrivateDirs( self ):
"mount private directories"