confd: silence lldpcli errors in log when lldpd is disabled

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2025-01-31 13:55:35 +01:00
parent 8bc389987c
commit 1fef35f77c
+2 -2
View File
@@ -1721,8 +1721,8 @@ static int change_hostname(sr_session_ctx_t *session, uint32_t sub_id, const cha
goto err;
/* Inform any running lldpd and avahi of the change ... */
systemf("lldpcli configure system hostname %s", hostnm);
systemf("avahi-set-host-name %s", hostnm);
systemf("initctl -bq status lldpd && lldpcli configure system hostname %s", hostnm);
systemf("initctl -bq status mdns && avahi-set-host-name %s", hostnm);
systemf("initctl -nbq touch netbrowse");
err:
if (fmt)