omshell

Allie M Hopkins allie at lsu.edu
Thu May 25 13:25:09 UTC 2006





I was hoping someone had insightful answers for you because I struggled
with the same thing.  I resorted to your method of removing the host first
then adding it back with the new data.  You may want to try unset
statement, then update.  It seems I got something to work once upon a time,
but I can't remember the right sequence.  In the end it was easier to
delete-add.

I also simply search the lease file for any static addresses or ddns name
configuration.

Let me know if you come across something that works.

Allie Hopkins



                                                                                                                             
                      "Billy Cook"                                                                                           
                      <wrcook at clemson.e        To:       dhcp-users at isc.org                                                  
                      du>                      cc:       (bcc: Allie M Hopkins/allie/LSU)                                    
                      Sent by:                 Subject:  Re: omshell                                                         
                      dhcp-users-bounce                                                                                      
                      @isc.org                                                                                               
                                                                                                                             
                                                                                                                             
                      05/25/2006 08:12                                                                                       
                      AM                                                                                                     
                      Please respond to                                                                                      
                      dhcp-users                                                                                             
                                                                                                                             
                                                                                                                             




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