Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911707 - net-misc/lldpd-1.0.16 - Parameters set for starting the lldpd service are ignored when using systemd
Summary: net-misc/lldpd-1.0.16 - Parameters set for starting the lldpd service are ign...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-04 13:28 UTC by nvaert1986
Modified: 2023-10-04 07:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nvaert1986 2023-08-04 13:28:14 UTC
When using systemd I'm unable to get parameters parsed to lldpd. When settings various options in /etc/conf.d/lldpd. I tried setting -ccc in order to be able to use the CDP protocol, but this gets ignored by systemd. When using OpenRC it should work, because command_args="${LLDPD_OPTS}" is set in /etc/init.d/lldpd, but when using systemd, the system just simply loads the defaults. The service file is as below:

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/lldpd


Reproducible: Always

Steps to Reproduce:
1. Set parameters for lldpd in /etc/conf.d/lldpd on a system running systemd
2. Start lldpd using systemd
3. No parameters are given
Actual Results:  
No parameters are parsed

Expected Results:  
The parameters set being parsed.
Comment 1 Mike Gilbert gentoo-dev 2023-08-04 15:14:29 UTC
Using /etc/conf.d to control the behavior of systemd services is prohibited on Gentoo.

https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy#Unit_file_guidelines

If you want to pass different parameters to the service, use "systemctl edit" and override the ExecStart setting.

For example:

systemctl edit lldpd.service
[Service]
# Clear the existing ExecStart setting
ExecStart=
# Set the new value
ExecStart=/usr/sbin/lldpd -ccc

Alternatively, you can just copy lldpd.service from /lib/systemd/system to /etc/systemd/system, and edit the file directly.