Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions package/netd/netd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ else
NETD_CONF_OPTS += --without-frr
endif

define NETD_INSTALL_EXTRA
cp $(NETD_PKGDIR)/tmpfiles.conf $(TARGET_DIR)/etc/tmpfiles.d/netd.conf
endef

NETD_TARGET_FINALIZE_HOOKS += NETD_INSTALL_EXTRA

$(eval $(autotools-package))
1 change: 1 addition & 0 deletions package/netd/tmpfiles.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d /etc/net.d - - -
2 changes: 1 addition & 1 deletion src/confd/src/dhcp-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ char *dhcp_compose_options(struct lyd_node *cfg, const char *ifname, char **opti

opts = realloc(*options, strlen(*options) + strlen(opt) + 1);
if (!opts) {
ERROR("failed reallocating options: %s", strerror(errno));
ERRNO("failed reallocating options");
free(*options);
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/confd/src/dhcp-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static void add(const char *subnet, struct lyd_node *cfg)

fp = fopenf("w", DNSMASQ_SUBNET_FMT, tag);
if (!fp) {
ERROR("Failed creating dnsmasq conf for %s: %s", subnet, strerror(errno));
ERRNO("Failed creating dnsmasq conf for %s", subnet);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/confd/src/firewall.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ int firewall_change(sr_session_ctx_t *session, struct lyd_node *config, struct l
fmkpath(0755, FIREWALLD_ZONES_DIR) ||
fmkpath(0755, FIREWALLD_SERVICES_DIR) ||
fmkpath(0755, FIREWALLD_POLICIES_DIR)) {
ERROR("Failed creating " FIREWALLD_DIR_NEXT " directory structure");
ERRNO("Failed creating " FIREWALLD_DIR_NEXT " directory structure");
err = SR_ERR_SYS;
goto done;
}
Expand Down
4 changes: 2 additions & 2 deletions src/confd/src/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ static int wifi_gen_aps_on_radio(const char *radio_name, struct lyd_node *cifs,

hostapd = fopen(hostapd_conf, "w");
if (!hostapd) {
ERROR("Failed to create hostapd config: %s", hostapd_conf);
ERRNO("Failed to create hostapd config: %s", hostapd_conf);
rc = SR_ERR_INTERNAL;
goto cleanup;
}
Expand Down Expand Up @@ -759,7 +759,7 @@ int hardware_change(sr_session_ctx_t *session, struct lyd_node *config, struct l

fp = fopen(GPSD_CONF_NEXT, "w");
if (!fp) {
ERROR("Could not open " GPSD_CONF_NEXT);
ERRNO("Could not open " GPSD_CONF_NEXT);
return SR_ERR_INTERNAL;
}
int i;
Expand Down
4 changes: 2 additions & 2 deletions src/confd/src/if-wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ int wifi_add_iface(struct lyd_node *cif, struct dagger *net)

iw = dagger_fopen_net_init(net, ifname, NETDAG_INIT_PRE, "wifi-iface.sh");
if (!iw) {
ERROR("Failed to open dagger file for WiFi interface creation");
ERRNO("Failed to open dagger file for WiFi interface creation");
return SR_ERR_INTERNAL;
}

Expand Down Expand Up @@ -340,7 +340,7 @@ int wifi_del_iface(struct lyd_node *dif, struct dagger *net)

iw = dagger_fopen_net_exit(net, ifname, NETDAG_EXIT_POST, "wifi-iface.sh");
if (!iw) {
ERROR("Failed to open dagger file for WiFi interface deletion");
ERRNO("Failed to open dagger file for WiFi interface deletion");
return SR_ERR_INTERNAL;
}

Expand Down
2 changes: 1 addition & 1 deletion src/confd/src/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static int change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd

fp = fopen(NTP_NEXT, "w");
if (!fp) {
ERROR("Failed creating %s: %s", NTP_NEXT, strerror(errno));
ERRNO("Failed creating %s", NTP_NEXT);
return SR_ERR_SYS;
}

Expand Down
6 changes: 3 additions & 3 deletions src/confd/src/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ int parse_ospf(sr_session_ctx_t *session, struct lyd_node *ospf)

fp = fopen(OSPFD_CONF_NEXT, "w");
if (!fp) {
ERROR("Failed to open %s", OSPFD_CONF_NEXT);
ERRNO("Failed to open %s", OSPFD_CONF_NEXT);
return SR_ERR_INTERNAL;
}

Expand Down Expand Up @@ -450,7 +450,7 @@ static void frr_daemons_write(int ospfd, int ripd, int bfdd)

fp = fopen(next, "w");
if (!fp) {
ERROR("Failed to open %s", next);
ERRNO("Failed to open %s", next);
return;
}

Expand Down Expand Up @@ -493,7 +493,7 @@ static void frr_daemons_write(int ospfd, int ripd, int bfdd)

fclose(fp);
if (rename(next, FRR_DAEMONS))
ERROR("Failed to rename %s to %s: %m", next, FRR_DAEMONS);
ERRNO("Failed to rename %s to %s", next, FRR_DAEMONS);
}

int routing_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
Expand Down
4 changes: 2 additions & 2 deletions src/confd/src/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static int change_dns(sr_session_ctx_t *session, struct lyd_node *config, struct

fp = fopen(fn, "w");
if (!fp) {
ERROR("failed updating %s: %s", fn, strerror(errno));
ERRNO("failed updating %s", fn);
return SR_ERR_SYS;
}

Expand Down Expand Up @@ -1189,7 +1189,7 @@ static sr_error_t generate_auth_keys(sr_session_ctx_t *session, const char *xpat

fp = fopenf("w", "/var/run/sshd/%s.keys", username);
if (!fp) {
ERROR("failed opening user \"%s\" authorized_keys file: %s", username, strerror(errno));
ERRNO("failed opening user \"%s\" authorized_keys file", username);
continue;
}

Expand Down
Loading