Remove Lease via omshell
Glenn Satchell
Glenn.Satchell at uniq.com.au
Mon Dec 7 11:24:05 UTC 2009
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
More information about the dhcp-users
mailing list