Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra docs on exactly where to start installing things? #36

Closed
jywarren opened this issue Oct 22, 2018 · 8 comments
Closed

Extra docs on exactly where to start installing things? #36

jywarren opened this issue Oct 22, 2018 · 8 comments

Comments

@jywarren
Copy link
Member

I see this line is where some PRs start to make changes:

Should we put some comment there and delineate an area where it's ideal to start installing scripts and running git or npm? I assume git is installed, is npm too?

Thank you!

@jywarren
Copy link
Member Author

Looking at #37 to install some NPM stuff...

@jywarren
Copy link
Member Author

Aha, sorry, so i think we need to separately document where to put things on initial install, vs. on each startup.

Maybe we ought to actually make 2 files, called startup and setup, which would be run as root? Then just link to them from the appropriate places? But i'm open to whatever makes sense!

@icarito
Copy link
Member

icarito commented Oct 23, 2018

We have two scripts, one runs outside the chroot as the build system (build.sh) and the other inside chroot (chroot-script.sh). Both run as root. The appropriate place to install git and npm etc is chroot-script.sh.

@jywarren
Copy link
Member Author

jywarren commented Oct 23, 2018 via email

@icarito
Copy link
Member

icarito commented Oct 24, 2018

Oh, yes, I should add these questions to the docs. The canonical way to run stuff on boot is to add them to /etc/rc.local.

@icarito
Copy link
Member

icarito commented Oct 24, 2018

In the Camera PR I had to add an empty rc.local because the install script will modify it https://github.com/publiclab/pi-builder/pull/13/files#diff-25aa350b8efc5496496765f60725aa9c
Also this is documented at https://publiclab.gitlab.io/pi-builder/scripting.html#running-scripts-on-startup

@icarito
Copy link
Member

icarito commented Oct 24, 2018

The general architecture is that files under /builder/files get copied over to the final image (before chroot script is run).

@jywarren
Copy link
Member Author

jywarren commented Oct 24, 2018 via email

@icarito icarito closed this as completed Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants