Skip to content

Commit

Permalink
confd: skip lldpd and avahi hostname reload during bootstrap
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Aug 2, 2023
1 parent dda7b37 commit d821a35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/confd/src/confd/ietf-system.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,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);
Expand Down

0 comments on commit d821a35

Please sign in to comment.