From e2e667473e93a48bee69722dea603418d0c60591 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Tue, 23 Nov 2021 12:00:36 -0800 Subject: meta-google: gbmc-ncsi-config: Rename address clear rules This ensures they are run prior to running other DHCP configuration logic. Change-Id: I0180414bbc291ea49e548a312cd2b713344613e1 Signed-off-by: William A. Kennington III --- .../ncsi/files/25-gbmc-ncsi-clear-ip.sh.in | 26 ++++++++++++++++++++++ .../ncsi/files/gbmc-ncsi-clear-ip.sh.in | 26 ---------------------- .../recipes-google/ncsi/gbmc-ncsi-config.bb | 8 +++---- 3 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 meta-google/recipes-google/ncsi/files/25-gbmc-ncsi-clear-ip.sh.in delete mode 100644 meta-google/recipes-google/ncsi/files/gbmc-ncsi-clear-ip.sh.in (limited to 'meta-google') diff --git a/meta-google/recipes-google/ncsi/files/25-gbmc-ncsi-clear-ip.sh.in b/meta-google/recipes-google/ncsi/files/25-gbmc-ncsi-clear-ip.sh.in new file mode 100644 index 000000000..e17a5e200 --- /dev/null +++ b/meta-google/recipes-google/ncsi/files/25-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 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 deleted file mode 100644 index e17a5e200..000000000 --- a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-clear-ip.sh.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb b/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb index 6e2582495..0312f0502 100644 --- a/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb +++ b/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb @@ -20,7 +20,7 @@ SRC_URI += " \ file://gbmc-ncsi-br-pub-addr.sh.in \ file://gbmc-ncsi-br-deprecated-ips.sh.in \ file://gbmc-ncsi-set-nicenabled.service.in \ - file://gbmc-ncsi-clear-ip.sh.in \ + file://25-gbmc-ncsi-clear-ip.sh.in \ " S = "${WORKDIR}" @@ -109,9 +109,9 @@ do_install:append() { dhcpdir=${D}${datadir}/gbmc-br-dhcp/ install -d -m0755 $dhcpdir - sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/gbmc-ncsi-clear-ip.sh.in \ - >${WORKDIR}/gbmc-ncsi-clear-ip.sh - install -m644 ${WORKDIR}/gbmc-ncsi-clear-ip.sh $dhcpdir + sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/25-gbmc-ncsi-clear-ip.sh.in \ + >${WORKDIR}/25-gbmc-ncsi-clear-ip.sh + install -m644 ${WORKDIR}/25-gbmc-ncsi-clear-ip.sh $dhcpdir sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/gbmc-ncsi-set-nicenabled.service.in \ >${D}${systemd_system_unitdir}/gbmc-ncsi-set-nicenabled.service -- cgit v1.2.3