busybox: udhcpc6: return error when interface is down

Busybox dhcp will quit without error if the interface is down during a
dhcp loop. Systemd needs to restart it if such error occurs so we need
to return failures.

Tested:
systemctl start gbmc-br-dhcp
ip link set eth0 down
Dec 15 11:05:24 yscef4-nfd01.prod.google.com systemd[1]: gbmc-br-dhcp.service: Scheduled restart job, restart counter is at 2.
Dec 15 11:05:24 yscef4-nfd01.prod.google.com systemd[1]: Stopped gBMC DHCP Client.
Dec 15 11:05:24 yscef4-nfd01.prod.google.com systemd[1]: Starting gBMC DHCP Client...
Dec 15 11:05:24 yscef4-nfd01.prod.google.com systemd[1]: Started gBMC DHCP Client.
Dec 15 11:05:24 yscef4-nfd01.prod.google.com udhcpc6[4823]: udhcpc6: can't get link-local IPv6 address
Dec 15 11:05:24 yscef4-nfd01.prod.google.com systemd[1]: gbmc-br-dhcp.service: Main process exited, code=exited, status=1/FAILURE
Dec 15 11:05:24 yscef4-nfd01.prod.google.com systemd[1]: gbmc-br-dhcp.service: Failed with result 'exit-code'.
Dec 15 11:05:29 yscef4-nfd01.prod.google.com systemd[1]: gbmc-br-dhcp.service: Scheduled restart job, restart counter is at 3.
Dec 15 11:05:29 yscef4-nfd01.prod.google.com systemd[1]: Stopped gBMC DHCP Client.
Dec 15 11:05:29 yscef4-nfd01.prod.google.com systemd[1]: Starting gBMC DHCP Client...
Dec 15 11:05:29 yscef4-nfd01.prod.google.com systemd[1]: Started gBMC DHCP Client.
Dec 15 11:05:29 yscef4-nfd01.prod.google.com udhcpc6[4829]: udhcpc6: can't get link-local IPv6 address
Dec 15 11:05:29 yscef4-nfd01.prod.google.com systemd[1]: gbmc-br-dhcp.service: Main process exited, code=exited, status=1/FAILURE

Change-Id: I242b7507b8d75bd55c173a6405353ee5ac331e41
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
(cherry picked from commit d2359615af1a5fc16f41e5380ebd5c8b4130e62a)
2 files changed
tree: b63fd11f03f4b6554c90f0a9730836494bb86de4
  1. conf/
  2. dynamic-layers/
  3. meta-nuvoton-npcm8xx/
  4. recipes-bsp/
  5. recipes-connectivity/
  6. recipes-core/
  7. recipes-devtools/
  8. recipes-extended/
  9. recipes-google/
  10. recipes-kernel/
  11. recipes-phosphor/
  12. recipes-support/
  13. LICENSE
  14. README.md
README.md

meta-gbmc-staging

This repository contains additions to the openbmc/meta-google layer that are not yet ready for OpenBMC inclusion.

How to use this layer

  1. Clone openbmc/openbmc from GitHub.
  2. Clone this layer from GitHub into a subdirectory of openbmc.