omshell

Billy Cook wrcook at clemson.edu
Thu May 25 13:12:57 UTC 2006


I guess I can work around this problem by removing the host entry and
adding a new one each time I want to edit one.  I'll have to store the
"statements" information somewhere else so I can repopulate it when I
create the new host entry.  Anyone have any other suggestions?

Thanks,
Billy Cook
Clemson University

On 5/22/06, Billy Cook <wrcook at clemson.edu> wrote:
> Hi,
> I'm trying to use omshell to create and modify host entries.  I'm able
> to create a host using the following commands:
>
> dhcp1:~ # omshell
> > connect
> obj: <null>
> > new host
> obj: host
> > set name = "ahost"
> obj: host
> name = "ahost"
> > set hardware-address = 00:80:c7:84:b1:94
> obj: host
> name = "ahost"
> hardware-address = 00:80:c7:84:b1:94
> > set hardware-type = 00:00:00:01
> obj: host
> name = "ahost"
> hardware-address = 00:80:c7:84:b1:94
> hardware-type = 00:00:00:01
> > set statements = "deny booting"
> obj: host
> name = "ahost"
> hardware-address = 00:80:c7:84:b1:94
> hardware-type = 00:00:00:01
> statements = "deny booting"
> > create
>
>
> Which results in the following entry in dhcpd.leases
>
> host ahost {
>  dynamic;
>  hardware ethernet 00:80:c7:84:b1:94;
>        supersede server.allow-booting = 00;
> }
>
>
> Then I want to query for the host so I use the following commands and
> receive the following output:
>
> dhcp1:~ # omshell
> > connect
> obj: <null>
> > new host
> obj: host
> > set name = "ahost"
> obj: host
> name = "ahost"
> > open
> obj: host
> name = "ahost"
> hardware-address = 00:80:c7:84:b1:94
> hardware-type = 00:00:00:01
>
>
> Question 1:
> Is there any way to view the statements section of the host entry?
>
>
> Next I tried to update the host entry by adding the following commands
> after I opened the entry:
> > set statements = "allow booting"
> obj: host
> name = "ahost"
> hardware-address = 00:80:c7:84:b1:94
> hardware-type = 00:00:00:01
> statements = "allow booting"
> > update
> can't update object: already exists
> obj: host
> name = "ahost"
> hardware-address = 00:80:c7:84:b1:94
> hardware-type = 00:00:00:01
> statements = "allow booting"
>
> Question 2:
> Why does it fail to update the host entry?
>
> Thanks,
> Billy Cook
> Clemson University
>


More information about the dhcp-users mailing list