[OpenWrt-Devel] Modifying configuration at package install

Eric Schultz eschultz at prplfoundation.org
Wed Jan 7 17:06:20 EST 2015


Matthias,

Thanks for the help. Will these scripts run even if it's the process
of creating a new OpenWrt image? Or only if I installed the opkg from
inside OpenWrt?

I'm looking for a way to change the previously setting on image
creation. For example, the setting is initially set to the default
192.168.1.1 during the build process and when my package is built and
added to the image, it's changed to 10.0.2.15.

I should have been clearer about what I was trying to do :)

Thanks again,

Eric

>Hi Eric,
>yes, you can run scripts at specific points during (un)installation  of a package.
>You can find more information here: http://wiki.openwrt.org/doc/devel/packages
>
>I think you want to use the "Package/postinst" part.
>Some quickly found examples:
>
>https://github.com/openwrt-routing/packages/blob/master/miniupnpd/Makefile
>https://github.com/openwrt/packages/blob/master/net/ddns-scripts/Makefile
>
>Hope that helps,
>best regards
>Matthias
>
>On 01/07/2015 09:28 PM, Eric Schultz wrote:
>> I'm trying to create an example package. In it, I want the package to
>> modify the IP address of the LAN to 10.0.2.15. If I had access to a
>> running OpenWrt console, I'd use "uci set" to change the ip address.
>> I'd like to perform this change manually though at package
>> installation time.
>>
>> Is there a way to run uci during the Package/install action in the
>> Makefile? Or is there a better way of making this change?
>>
>> Thanks,
>>
>> Eric
>>

-- 
Eric Schultz, Community Manager, prpl Foundation
http://www.prplfoundation.org
eschultz at prplfoundation.org
cell: 920-539-0404
skype: ericschultzwi
@EricPrpl
_______________________________________________
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