[PATCH] dhcpcd: Allow lease file to be set on command line

Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Allow-lease-file-to-be-
set-on-command-line.patch.

Currently, dhcpcd names its lease files using the interface name
as the unique part of the name.  There are a couple reasons why
this may not work well: firstly if "eth0" can have different MAC
addresses (multiple USB-Ethernet dongles for example) leases for
one interface aren't valid for the other.  Secondly, when using
a wireless interface, it would be convenient to hold multiple
leases in parallel for each SSID one is connected to.

This change adds a suffix to each interface argument (dhcpcd can
accept multiple interface arguments) that specifies the identifier
to use to save lease files with.  By default, the behavior is
identical.

The second CL (https://gerrit.chromium.org/gerrit/22170) for fixing
pid file formating bug originally introduced by this CL is not needed
anymore since this bug doesn't exist/apply in the updated implementation.

BUG: 22956197
Change-Id: Id04168daa965065ca50e60f55c4cdc80f751c9c3

Reviewed-on: https://gerrit.chromium.org/gerrit/21991
Reviewed-on: https://gerrit.chromium.org/gerrit/22170
7 files changed