Re: Re: Remove Lease via omshell
Billy Ng
mondeo1055 at yahoo.com
Tue Dec 29 02:25:17 UTC 2009
Dear All,
When I tried to remove the lease from omshell by:
omshell
>server localhost
>port 7911
>key my_key xxxxxx
>new host
>set name = "HOSTNAME"
(where the HOSTNAME is the client-hostname listed in the dhcpd.lease)
>open
can't open object: not found
obj: host
name = "HOSTNAME"
>remove
can't destroy object: not found
obj: host
name = "HOSTNAME"
Any idea?
Best Regards,
Billy
________________________________
寄件人﹕ Glenn Satchell <Glenn.Satchell at uniq.com.au>
收件人﹕ dhcp-users at lists.isc.org
傳送日期﹕ 2009/12/7 (一) 7:24:05 PM
主題: Re:Re: Remove Lease via omshell
They are in /etc/dhcpd.conf, so you could either hard code them in your
script, or use some grep and cut to extract them from dhcpd.conf into
shell variables which you plug into your omshell command line.
Something like this:
#! /bin/sh
PORT=`grep port /etc/dhcpd.conf | cut -f2 | sed -e 's/;//'`
# repeat for other vars like secret and keyname
omshell << EOF
server localhost
port $PORT
key $keyname $secret
connect
new host
set name = "hostname"
open
remove
EOF
regards,
-glenn
>Date: Mon, 7 Dec 2009 18:59:15 +0800 (CST)
>From: syhshanda <syhshanda at 126.com>
>
> Hi,
> In the command line of "key keyname secret", how can I get the keyname and
secret.
> Thanks for you help.
> Best Regards,
> Bob
>
>
>
>
>
>
> 婓2009-12-07?12:07:25ㄛApu?<apu at spfld.com>?迡耋ㄩ
> >On?12/6/09?10:30?PM,?Billy?Ng?wrote:
> >>?Is?it?possible?to?remove?a?lease?via?omshell??If?yes,?would?you
> >>?please?kindly?advise?the?syntax?of?omshell??Thanks?a?lot.
> >
> >
> > server?localhost
> > port?7911
> > key?keyname?secret
> > connect
> > new?host
> > set?name?=?"hostname"
> > open
> > remove
> >
> >
> >--?
> >Apu?<apu at spfld.com>
> >http://www.spfld.com/
> >
> >
> >_______________________________________________
> >dhcp-users?mailing?list
> >dhcp-users at lists.isc.org
> >https://lists.isc.org/mailman/listinfo/dhcp-users
_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users
Yahoo!香港提供網上安全攻略,教你如何防範黑客! 請前往 http://hk.promo.yahoo.com/security/ 了解更多!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20091228/16475e25/attachment.html>
More information about the dhcp-users
mailing list