From 15795c4b41210a59d446cd4dab2cabb69c6e04ea Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 2 Aug 2023 15:45:48 +0200 Subject: [PATCH] confd: skip lldpd and avahi hostname reload during bootstrap Signed-off-by: Joachim Wiberg --- src/confd/src/confd/ietf-system.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/confd/src/confd/ietf-system.c b/src/confd/src/confd/ietf-system.c index 5cbca005..4119c3a3 100644 --- a/src/confd/src/confd/ietf-system.c +++ b/src/confd/src/confd/ietf-system.c @@ -1050,6 +1050,10 @@ static int change_hostname(sr_session_ctx_t *session, uint32_t sub_id, const cha goto err; } + /* skip in bootstrap, lldpd and avahi have not started yet */ + if (systemf("runlevel >/dev/null 2>&1")) + goto err; + /* Inform any running lldpd and avahi of the change ... */ systemf("lldpcli configure system hostname %s", nm); systemf("avahi-set-host-name %s", nm);