diff options
author | William A. Kennington III <wak@google.com> | 2021-11-04 00:54:51 +0300 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2021-12-04 04:20:45 +0300 |
commit | b174c185f31bf14d430e68bb868ccf14ff7d4be3 (patch) | |
tree | fda5ab522fc60af118cd4e286b195ba1fcc851ab /meta-google/recipes-google/ncsi/files/gbmc-ncsi-clear-ip.sh.in | |
parent | 21e7e45b77e026689b72f182aca4ba2ffd5e0a36 (diff) | |
download | openbmc-b174c185f31bf14d430e68bb868ccf14ff7d4be3.tar.xz |
meta-google: gbmc-bridge: Implement DHCP
This makes it possible for a BMC to acquire a public address via DHCP
provisioning.
None of the update processes are included yet.
Change-Id: I51ca2aa4859bcd2b9e909dd5a0d9e66cfbd648af
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'meta-google/recipes-google/ncsi/files/gbmc-ncsi-clear-ip.sh.in')
-rw-r--r-- | meta-google/recipes-google/ncsi/files/gbmc-ncsi-clear-ip.sh.in | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-clear-ip.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-clear-ip.sh.in new file mode 100644 index 000000000..e17a5e200 --- /dev/null +++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-clear-ip.sh.in @@ -0,0 +1,26 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[ -z "${gbmc_ncsi_clear_ip-}" ] || exit + +source /usr/libexec/ncsid_lib.sh || exit + +gbmc_ncsi_clear_ip_hook() { + UpdateIP xyz.openbmc_project.Network '@NCSI_IF@' '0.0.0.0' '0' || true + UpdateIP xyz.openbmc_project.Network '@NCSI_IF@' '::' '0' || true +} + +GBMC_BR_DHCP_HOOKS+=(gbmc_ncsi_clear_ip_hook) + +gbmc_ncsi_clear_ip=1 |