[LEDE-DEV] Makefile question
david at lang.hm
Fri Feb 10 21:33:00 PST 2017
On Fri, 10 Feb 2017, Philip Prindeville wrote:
> I was wondering if there’s an obvious place to install a hook that’s:
> (a) after all the packages have been installed;
> (b) before the root filesystem image gets finalized;
> I’d like to be able to run some simple sed scripts inside the root-to-be
> directory to make some changes, maybe do an rm etc/rc.d/S??sshd so that the
> sshd service is installed but isn’t enabled by default, maybe inject a new
> root password or create an extra user login, etc.
> That sort of thing.
> I looked around through the makefiles but nothing stood out.
> Should be easy, right?
some of what you are talking about can be done by putting the replacement files
in the /files heirarchy and they will replace the files created by the packages.
This can't eliminate the /etc/rc.d/S* files as it only adds files, and it's not
as flexibile as adding a user or changing a password (as it would just let you
replace the /etc/passwd, /etc/shadow files, not modify them).
If you look for where the /files/* are copied into the filesystem, that is
probably the place you would want to add your scripting hooks.
More information about the Lede-dev