[OpenWrt-Devel] Question about custom script at init on Trunk.-
David Lang
david at lang.hm
Wed Jan 27 05:54:11 EST 2016
On Wed, 27 Jan 2016, Karl Palsson wrote:
> 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" ?
what I do is to flash the base image on a device, and then tweak it until I get
things working and then create a new image including that file.
If I need different versions for different devices, I work on each one
separately and then figure a way to detect the different conditions.
Another example from Scale, We use Raspberry Pi computers to run self-service
registration stations and to provide digital signs when connected to large TVs.
I use a single image that checks to see if it has a mouse attached, if so it's a
registration station, otherwise it's a sign and then the appropriate thing gets
launched.
you can use IP addresses/ranges, DHCP parameters, holding a button, or many
other things to detect the different conditions.
David Lang
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
-------------- 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