Re: "dhcpcd not running"
Roy Marples
Wed Apr 27 14:44:55 2016
On 27/04/2016 15:11, Shahid Mahmood wrote:
>
> On Wed, Apr 27, 2016 at 9:50 AM, Roy Marples <roy@xxxxxxxxxxxx
> <mailto: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.
This all sounds very odd.
dhcpcd is designed to work on >1 interface.
Why must it operate like so, what is your use case?
You can set metrics for each interface, lowest wins.
interface eth0
metric 99999 #nice and high so vlans win
interface eth0.123
metric 4 #nice and low so it beats eth0
That means eth0.123 will always be preferred over eth0
Otherwise, you'll have to dervice which interface dhcpcd was started for
based on the pidfile it creates.
Roy
Archive administrator: postmaster@marples.name