mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
Merge pull request #1444 from kernelkit/another-netd-fixup
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
d /etc/net.d - - -
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user