[OpenWrt-Devel] Question about custom script at init on Trunk.-
Karl Palsson
karlp at tweak.net.au
Wed Jan 27 05:07:17 EST 2016
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Eric Schultz <eschultz at prplfoundation.org> wrote:
> Guillermo,
>
> It's always best to use a custom package if you can. Modifying
> upstream leads to problems like this.
>
> I don't think you'd need those changes in uci-defaults.sh.
> Instead, I think you should put your changes in your own
> uci-default, like 02_network, but your own. Use a number after
> 02, like 03_custom and put it in /etc/uci-defaults. It should
> run on first boot. As long as this uci-default script completes
> successfully, I think the change should occur and the script
> itself should be deleted so it doesn't run again.
>
Along these lines, I've tried putting in something like
80_mystuff, where I want to set some configurations options for
various packages that depend on the hardware they're running on.
However, the uci-defaults files are run in alphabetical order, so
while 80_mystuff might come after the 01_leds, 02_network stuff
from core OpenWrt, the uci-defaults files from packages normally
don't seem to have a numerical prefix. This then means that my
80_mystuff script tries to set a config option in a file that
doesn't exist yet.
Now, yes, I can have my 80_mystuff script go and try and create
the package config files it might want to modify, but really, I
want "mystuff" to run _last_ or at least, after all the packages
have run. Is there any better system for this other than just
naming my script zzzzz_mystuff instead of 80_mystuff? Is that
expected to be "good enough" ?
I'm trying this, because I've _been_ trying to use packages
instead of modifying upstream, but when I want my package to do
different things for different targets, it's seemed easier to
hook into the existing target code, rather than trying to copy
target detection and config into a package Config.in options
Sincerely,
Karl Palsson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAEBAgAGBQJWqJbVAAoJEBmotQ/U1cr29HwP/3I3TemR4suETncwKdssUHpt
7RP4+SPgSZPENNub4xlViSYz8aB69AQZ+wgwzQZR8p3UbzCtc02BJoa0ikDx8H4F
EvYap9GhQ3hCKznTD9GbZCvGLaqAHLn9wmMlPzPcrqQeMQICdsiXhg1c410tICiO
JBWwoZvg5bbBStfyh1vX4kvNX3tVMFYgJePSL8r3o/BgX9+q9jCIaZbae2A7Q4xU
1fVuxPXJLlxRDGdA/woFGFX1iokzaZL+yP6jY9+TW/VtA6MiLNBxnYn5X5C78i0Q
L9of5vOYkZ4s9FvgsKV99x3Bdqkmnbza0lRt8nGsOKtvWd3CH/sTBX9mpXZKQPsu
pSfzgbv3rz5Bmix5HG1vuEqbrA+i6VE7pyS5YstXfIu8GWCtjAlUGSjxLQolrl2x
+yaaU7EEIuqa855mhw6dQ5KL5CJQPITiyohsOsB0VsjSaLP6VmUqCPGohNlwK6Zr
YslCozrzZf507mieYz5N5F4jRXoLMnO8UuVuBzr0ImZzw7Zy0zZaJm/yLNOaBUvM
NGiIFBlXHRsutcHMA4PBwGAn/y3nSC4bZ8V8ip2mmJlNgJpb9mSBDfngahv5n7X5
OboDzgZRWJxAlZgjH06vQNFhP6SuCv7i4pSVifnwydXALUakRmv7A9lk8elR1meE
1Ops4PWevuKM7VURfgaY
=Wijj
-----END PGP SIGNATURE-----
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list