longsleep / build-pine64-image

Pine64 Linux build scripts, tools and instructions
MIT License
235 stars 126 forks source link

Add custom setup script #48

Closed ThomDietrich closed 6 years ago

ThomDietrich commented 7 years ago

Hey @longsleep, as you probably already guessed, I'm currently working on a project based on yours. Besides building the image, I'm injecting a custom rc.local, calling /boot/first-boot.sh, in order to do some first boot modifications.

At the moment this is simply done by appending commands to the bottom of simpleimage/make_rootfs.sh. Would you be interested in a PR for these preparations?

longsleep commented 7 years ago

Hey Thomas,

On Mon, Feb 13, 2017 at 5:11 PM, Thomas Dietrich notifications@github.com wrote:

Hey @longsleep https://github.com/longsleep, as you probably already guessed, I'm currently working on a project based on yours. Besides building the image, I'm injecting a custom rc.local, calling /boot/first-boot.sh, in order to do some first boot modifications.

At the moment this is simply done by appending commands to the bottom of simpleimage/make_rootfs.sh. Would you be interested in a PR for these preparations?

Sure, i would prefer some run-parts based hook approach though, which simply runs additional scripts at the various stages based on a simple file naming scheme similar to what pbuilder is doing with the --hookdir parameter. See http://manpages.ubuntu.com/manpages/precise/man8/pbuilder.8.html for inspiriation.

Cheers Simon

ThomDietrich commented 7 years ago

You know, looking at this with fresh eyes, that is the better solution 👍 I've started to do small modifications in rc.local once and never thought twice about that since. I'd leave /boot/whatevername.sh where it is, allows modifications or settings to be applied after flashing. I'll come back here soon.

longsleep commented 6 years ago

Closing for now, please open a PR if you have something and/or still relevant.

ThomDietrich commented 6 years ago

I didn't look into it any further as my (inferior) solution is doing the job just fine. I'll open a PR if I ever get around changing it. Thanks for the reminder. Best!