summaryrefslogtreecommitdiff
path: root/meta-google/recipes-google
diff options
context:
space:
mode:
authorYuxiao Zhang <yuxiaozhang@google.com>2023-08-18 00:37:13 +0300
committerYuxiao Zhang <yuxiaozhang@google.com>2023-08-23 21:47:52 +0300
commit42fe96919fd85743f2c129a8397d86dc70cd79a6 (patch)
treeca34d6a3aad7d0e3fc07ee56ff492229656d986a /meta-google/recipes-google
parentaf9e6d301f51e1afff49d51568ab5f1518b5f255 (diff)
downloadopenbmc-42fe96919fd85743f2c129a8397d86dc70cd79a6.tar.xz
meta-google: gbmc-bridge: return error when dhcp-done is running
If dhcp-done is running already we want a fresh start, so return error to trigger a powercycle. Change-Id: I146054adacb0ea62de54ec525915cecd27d3e85b Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
Diffstat (limited to 'meta-google/recipes-google')
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh
index d90b724fc0..c6fddbb9cf 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh
@@ -13,6 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+systemctl stop gbmc-br-dhcp
+
+# in some cases dhcp-done might be run already, in this case we want
+# a powercycle for a clean install
+systemctl is-active -q dhcp-done@* && exit 1
+
# stop dhcp term service to prevent race condition
systemctl is-active --quiet gbmc-br-dhcp-term && systemctl stop gbmc-br-dhcp-term