Using Expect to access the omshell

Brad Dameron Brad.Dameron at clearwire.com
Thu Jul 23 21:19:25 UTC 2009


I use OMAPI-PERL for doing this stuff. It's damn easy. It compiles up to version 3.1.x. Have not tried it with DHCP 4.x yet. There is also OMCMD which will make this easier too.
 
http://freshmeat.net/projects/omcmd/ <http://freshmeat.net/projects/omcmd/> 
 
Brad

________________________________

From: dhcp-users-bounces at lists.isc.org on behalf of Martin McCormick
Sent: Thu 7/23/2009 11:47 AM
To: Users of ISC DHCP
Subject: Using Expect to access the omshell




        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
_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090723/1c70948a/attachment.html>


More information about the dhcp-users mailing list