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

Autostart and autoenable packages #15

Open
aloisklink opened this issue Jul 25, 2022 · 2 comments
Open

Autostart and autoenable packages #15

aloisklink opened this issue Jul 25, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@aloisklink
Copy link
Contributor

According to the OpenWRT wiki: https://openwrt.org/docs/guide-developer/packages#packaging_a_service,
when installing/removing an OpenWRT package, the package's service file is automatically enabled/disabled.

However, my very limited testing shows that this isn't the case (maybe it's a feature only in newer OpenWRT versions?)

Nonetheless, it might be worth explicitly enabling the server files, so that we can also start them too (enable starts them on reboot, start starts them immediately).

@aloisklink aloisklink added the enhancement New feature or request label Jul 25, 2022
@aloisklink aloisklink self-assigned this Jul 25, 2022
@aloisklink
Copy link
Contributor Author

Hmmm, looks like the default_postinst should definitely be starting and enabling these services: see https://github.com/openwrt/openwrt/blob/7b07c3cff57f057d6780d34adeb23c06123732db/package/base-files/files/lib/functions.sh#L300-L303

@aloisklink
Copy link
Contributor Author

I think this might be fixed by #19.

However, it's possible that the init scripts are failing due to

$(INSTALL_DIR) $(1)/etc/init.d

It may be that when running https://github.com/openwrt/openwrt/blob/7b07c3cff57f057d6780d34adeb23c06123732db/package/base-files/files/lib/functions.sh#L296, since the folder /etc/init.d/ is in the package file list, it tries to run /etc/init.d start, which fails since /etc/init.d is a directory.

I'm not 100% sure, so we'll need to test this the next time we do an install on a new OpenWRT image. (maybe it's also just our old OpenWRT 19.07's init system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant