Using Expect to access the omshell

Martin McCormick martin at dc.cis.okstate.edu
Thu Jul 23 18:47:08 UTC 2009


	We use omshell to manage static bootP hosts on our DHCP
servers. it has been necessary at times to move hundreds of
hosts out of one subnet into another via omshell and we have
used an expect script to do this. The pattern is to send a
command, wait for the prompt and send the next command. No more
output is sent until we see the prompt each time. Is it safe to
let expect run as fast as it can or can the input buffer in
omshell be overrun even if we are waiting for the next prompt
before sending?

	We have been re-subnetting some buildings so these
megamoves are unusual and a real test of one's scripting
abilities.

	Recently after a move of several-hundred bootP hosts, a
few didn't get deleted. I first thought it was a buffering
issue, but I think now it was my script wasn't thorough enough.
Letting expect loose at full speed is the best outcome since it
finishes faster. No need in slowing it down if that isn't an
issue.

	Thanks for any constructive thoughts. Even at full
speed, it has always appeared to behave logically.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Telecommunications Services Group



More information about the dhcp-users mailing list