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

etc: Add Debian init.d script for mptcpd. #207

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ossama-othman
Copy link
Member

Add a Debian init.d script for mptcpd for the case where start of
mptcpd through systemd is not available or undesirable.

Add a Debian init.d script for mptcpd for the case where start of
mptcpd through systemd is not available or undesirable.
@ossama-othman ossama-othman added the enhancement New feature or request label Jan 28, 2022
@ossama-othman ossama-othman self-assigned this Jan 28, 2022
@ossama-othman
Copy link
Member Author

@matttbe FYI

@coveralls
Copy link

coveralls commented Jan 28, 2022

Pull Request Test Coverage Report for Build 1785594087

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 53.266%

Totals Coverage Status
Change from base Build 1753467561: 0.0%
Covered Lines: 1060
Relevant Lines: 1990

💛 - Coveralls

@ossama-othman
Copy link
Member Author

The etc/init.d/mptcpd script generated by this change is installed even when systemd is detected by the configure script. I'm not sure that is desirable.

@ossama-othman
Copy link
Member Author

I don't yet know if other platforms such as Fedora support this Debian style init.d script.

@mjmartineau
Copy link
Member

The etc/init.d/mptcpd script generated by this change is installed even when systemd is detected by the configure script. I'm not sure that is desirable.

Yeah, that doesn't seem good - but I don't know how packagers usually handle installation of sysv-init vs systemd scripts

@matttbe
Copy link
Member

matttbe commented Jan 28, 2022

The etc/init.d/mptcpd script generated by this change is installed even when systemd is detected by the configure script. I'm not sure that is desirable.

Yeah, that doesn't seem good - but I don't know how packagers usually handle installation of sysv-init vs systemd scripts

If I'm not mistaken, you can install both the init.d script and systemd service. If you use systemd and there is a service, the init.d script will be ignored I guess. e.g. for iwd: https://salsa.debian.org/debian/iwd/-/commit/65a0232b9715d9002d69d55b217ae6e3f3c75ffb

If it eases stuff, only having the file in the tarball and not installing it by default (or only with a configure option) would help packagers.
If the init.d script you have is Debian-specific, we can add it in the Debian package directly and not maintain it here.

The $sysconfdir/init.d/mptcpd script does not support --help and
--version command line options.  Exempt it from the Automake generated
installcheck.
### END INIT INFO

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@libdir@
export LD_LIBRARY_PATH
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting this environment variable like this probably isn't good idea when supporting multi-arch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #211 for a related issue.

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@libdir@
export LD_LIBRARY_PATH

DAEMON="@mptcpdbindir@/mptcpd"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. This may not play well with multi-arch.

@kilobyte
Copy link

kilobyte commented Sep 9, 2023

  • (nit) the hashbang doesn't need to go through env, that's just a limitation of FreeBSD that's irrelevant here (because 1. if FreeBSD grows MPTCP support, it won't use Linux-specific internal management interfaces thus this daemon, 2. it was fixed by making /lib/init/init-d-script a binary stub)
  • description: "Debian" is merely the first distro to support, any other that uses init scripts (Slack, Alpine, ...) can use the script as-is
  • description: "init script" is redundant here
  • messing with LD_LIBRARY_PATH is indeed unneeded and harmful

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

Successfully merging this pull request may close these issues.

None yet

5 participants