You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this perfect, great builder i'm able to initialize, upgrade and provision my router and access points in a matter of minutes. I love it!
I've created a dozen of nix-files which results in installing packages and provisioning uci-defaults files to do all the configuration.
For each OpenWRT-device i do some concatenation like:
One small issue i seem to be running into is that i seem to be unable to get provisioned files to have the executable flag set in the resulting sysupgrade image.
Given the below nix-file which is to enable iperf3 running as a service on all my OpenWRT devices which i have Zabbix configured to test on a regular basis. It exposes a combination of packages and snippet which get concatenated with other nix-files (see the snippet above).
In this specific nix-file i write a service-definition file $out/etc/init.d/iperf3 which needs to be executable. If i add an instruction to add the executable flag on this file, the flag seems to get lost somewhere. I can imagine that this happens during the copying of files to the image.
I can workaround the issue by adding the executable flag from within a uci-defaults file. Which is not a problem, but is not as "clean" as it could be.
let
in
{
packages = [ "iperf3" ];
snippet = ''
mkdir -p $out/etc/uci-defaults
cat > $out/etc/uci-defaults/96-iperf3 <<EOF
chmod +x /etc/init.d/iperf3 <=== this action does work
/etc/init.d/iperf3 enable
/etc/init.d/iperf3 start
EOF
mkdir -p $out/etc/init.d
cat > $out/etc/init.d/iperf3 <<EOF
#!/bin/sh /etc/rc.common
# Copyright (C) 2008-2011 OpenWrt.org
START=60
USE_PROCD=1
PROG=/usr/bin/iperf3
start_service() {
procd_open_instance
procd_set_param command /usr/bin/iperf3 -s -D
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
EOF
chmod +x $out/etc/init.d/iperf3 <=== this action does not work
'';
}
Is this an issue which might be resolved?
I think i see the same issue when looking at the uci-defaults file in /rom/etc/uci-defaults:
This as my custom uci-defaults files are not executable while the OpenWRT ones are.
thanks in advance!
The text was updated successfully, but these errors were encountered:
With this perfect, great builder i'm able to initialize, upgrade and provision my router and access points in a matter of minutes. I love it!
I've created a dozen of nix-files which results in installing packages and provisioning
uci-defaults
files to do all the configuration.For each OpenWRT-device i do some concatenation like:
One small issue i seem to be running into is that i seem to be unable to get provisioned files to have the executable flag set in the resulting sysupgrade image.
Given the below nix-file which is to enable iperf3 running as a service on all my OpenWRT devices which i have Zabbix configured to test on a regular basis. It exposes a combination of
packages
andsnippet
which get concatenated with other nix-files (see the snippet above).In this specific nix-file i write a service-definition file
$out/etc/init.d/iperf3
which needs to be executable. If i add an instruction to add the executable flag on this file, the flag seems to get lost somewhere. I can imagine that this happens during the copying of files to the image.I can workaround the issue by adding the executable flag from within a uci-defaults file. Which is not a problem, but is not as "clean" as it could be.
Is this an issue which might be resolved?
I think i see the same issue when looking at the uci-defaults file in
/rom/etc/uci-defaults
:This as my custom uci-defaults files are not executable while the OpenWRT ones are.
thanks in advance!
The text was updated successfully, but these errors were encountered: