Re: "dhcpcd not running"
Shahid Mahmood
Wed Apr 27 14:12:07 2016
On Wed, Apr 27, 2016 at 9:50 AM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
> Hi
>
> On 26/04/2016 21:45, Shahid Mahmood wrote:
> > I am trying "dhcpcd -k" and "dhcpcd -x" options on a running instance of
> > dhcpcd, without specifying interface. As per man page, "If no interface
> > is specified, then the above is applied to all interfaces.". Instead I
> > am getting:
> >
> > "dhcpcd not running"
> >
> > Instead, "dhcpcd -k eth0" or "dhcpcd -x eth0" works fine.
> >
> > Note, dhcpcd was started with interface supplied at command line.
> >
> > dhcpcd -c <xx> eth0
>
> Suggestions on how to improve the man page are welcome :)
>
> If dhcpcd is started on a single interface without the -M switch then it
> will ONLY operate on that interface and all calls that send signals (-k,
> -x, -n, -N) if subsequent dhcpcd invocations ONLY specify that interface.
>
> If none or more than one interfaces are given, or the -M switch is
> given, then dhcpcd will operate on the global context for the listed
> interfaces, or all if none specified.
>
> Roy
>
Thanks. Yes, that's how it seems to operate. My challenge is that I need to
start dhcpcd on exactly on one interface. The name of that interface would
change as and when a vlan is configured on it (e.g eth0.123). The previous
instance must release the lease and exit.
I needed to accomplish this without needing to keep the interface name in a
local variable.
So here is what worked for me:
Put the interface name in the dhcpcd.conf file (ie 'interface eth0.x') when
starting dhcpcd.
After that, I can just use 'dhcpcd -x' and it gets killed.
Thanks again!
-shahid
Archive administrator: postmaster@marples.name