OpenWrt Forum Archive

Topic: Add my own scripts in OpenWRT Firmware?

The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,
is anybody know, how I can include my own script files directly in OpenWRT firmware when compiling it? I had try several times, but without any luck sad.

Thanks.

Files you put into <kamikaze_directory>/files get included into your firmware.

Take a look at the ImageBuilderHowto in the wiki Section 3.4.  It works the same way with buildroot, for example here is a list of my custom files which replace the default sysctl.conf, firewall, and netconfig.  I also add an additional hotplug script.

~$ find kamikaze_7.07/files/
kamikaze_7.07/files/
kamikaze_7.07/files/etc
kamikaze_7.07/files/etc/sysctl.conf
kamikaze_7.07/files/etc/init.d
kamikaze_7.07/files/etc/init.d/firewall
kamikaze_7.07/files/etc/init.d/netconfig
kamikaze_7.07/files/etc/hotplug.d
kamikaze_7.07/files/etc/hotplug.d/iface
kamikaze_7.07/files/etc/hotplug.d/iface/20-fprobe-ulog

The discussion might have continued from here.