Trouble Again with "set statements =" in Dynamic Groups

Martin McCormick martin at dc.cis.okstate.edu
Wed Feb 29 17:33:06 UTC 2012


Jeff Waller writes:
> Hrm, I saw omshell and thought omapi bug, but then looked into the source
> code.  I can't find that one can manipulate groups via omapi at all let 
> alone
> certain aspects of groups.  Can you elaborate?

	The documentation for omshell says one can manipulate or
partly manipulate leases, hosts and groups. I haven't tried
anything with dynamic leases as we usually just set up a pool
and let dhcpd do all the work but I have created and destroied
thousands of bootP or static hosts and a few groups. The syntax
for creating a new group is daunting, so much so that I wrote
some back-end C code to generate an expect script that actually
is what calls up the omshell and talks to it. The set statements
directive is enough to drive one mad because each statement such
as the next-server or file statement is actually appended, one
after the other separated by simicolons; so the line becomes
lo-o-o-ong. One typo or loosing one's place is a show-stopper so
it doesn't lend itself to manual entry at all but you can
automate it somewhat.

	When something goes wrong such as with my bad
next-server statement, the only true feedback you get is by
looking at the representation of the group in dhcpd.leases on
the server. If you see all the information you thought you put
there, you were successful. If you see the } of the group
too soon, then the server just gave up.
omshell keeps echoing all the input as if it was happy but
nothing else gets in to the group.

	I have also noticed that, when working with static
hosts, one can enter a MAC address and then an open command and
then all the information on the remote server about the host
appears. In manipulating groups, the "open" command doesn't let
you see the group information on the remote server.

	I have not been able to update existing group
information but I am not sure if that was because of omshell or
because ther was also something wrong with the information I was
trying to add.

	The remove command in omshell will successfully remove a
group object. Basically, it seems that you can partly manipulate
groups with omshell, but it is not much fun.


More information about the dhcp-users mailing list