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

babeld: Added missing $IPKG_INSTROOT #95

Merged
merged 1 commit into from
May 4, 2015

Conversation

kostko
Copy link
Contributor

@kostko kostko commented May 1, 2015

Without this automatic init script activation in imagebuilder fails.

@kerneis
Copy link
Contributor

kerneis commented May 2, 2015 via email

@kerneis
Copy link
Contributor

kerneis commented May 2, 2015 via email

Signed-off-by: Jernej Kos <jernej@kos.mx>
@kostko
Copy link
Contributor Author

kostko commented May 2, 2015

Do you have any reference? Would it make sense to add this to other packages in this repo as well?

Yes, all init scripts must have this. The issue is that the init scripts are evaluated at firmware image generation time by the imagebuilder. And at that time, the root path / is the host's root, so accessing functions will fail. And this will cause init script activation to fail which will cause the generated firmware image to not run the specific services at startup and a manual enable call will be required.

Init script activation happens here:

Also remember to include a sign off line

I've fixed the commit now.

@kerneis
Copy link
Contributor

kerneis commented May 2, 2015

I'm almost convinced to merge this, but I'd just like to fully understand. In the link you gave, imagebuilder is executing *.postinst scripts, and there is no explicit postinst script for the babeld package. Are those automatically generated? Or is this a script that you wrote separately to configure the image for your purposes, and containing something equivalent to /etc/initd./babeld enable? In the latter case, wouldn't a firstboot script be a better way to reach the same result?

In any case, I think I'll accept the patch because it seems harmless, and potentially useful. I'm just trying to figure out why this pattern is not more widespread, and what use case it solves exactly. Thanks again for your time.

@kostko
Copy link
Contributor Author

kostko commented May 3, 2015

Oh, it seems this has been changed in trunk. Check out the barrier breaker branch, it uses the enable call:

kerneis added a commit that referenced this pull request May 4, 2015
babeld: Added missing $IPKG_INSTROOT
@kerneis kerneis merged commit 5b614e5 into openwrt:master May 4, 2015
@kerneis
Copy link
Contributor

kerneis commented May 4, 2015

Merged, and should probably go to Chaos Calmer branch as well (but I cannot do this from the web interface).

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

Successfully merging this pull request may close these issues.

2 participants