Image builder not placing custom config files on compiled image


#1

Hi.
I’m using the latest version of the imagebuilder (https://github.com/gl-inet/imagebuilder)
I need an image preconfigured with different packages and some custom config files.
I’m creating the image using the command
./gl_image -p ar300m16 -e "openssh-sftp-server nano htop curl tcpdump usbutils etc…"
and I’m placing my custom config files on
imagebuilder/3.0/openwrt-imagebuilder-ar71xx-generic/files/etc/config/mycustomconfig

when i flash the device, all the packages are there, but my custom config files are not.
Where do i need to do? I’m placing the files on the wrong directory OR do i need to specify the files location at the moment of execute the gl_image command?
thanks!!!


#2

You are placing them in the wrong directory. They go in the root of the imagebuilder, in the files folder.
So imagebuilder/files following the usual folder structure required.


#3

I am sure I’m just missing something obvious, but I cant seem to get my files included in my image. Have tried creating a folder imagebuilder/files, but nothing gets copied over to the root directory in my image. command to build the image is simply python2.7 gl_image -p x750 -e "wget vnstat minicom".

the build completes but when I flash it, the extra packages are installed but none of the custom config files are there.


#4

Where did you put your config files?


#5

imagebuilder/files/etc/
imagebuilder/files/etc/config
imagebuilder/files/etc/init.d
imagebuilder/files/usr/bin


#6

You have to add the files path to images.json.


#7

Yes, thank you. It turns out there were some initialization scripts overwriting my config settings. Scripting my configuration in /etc/uci-defaults instead seemed to do the trick (probably since I was able to make my script the last to run).