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

service module does not work on FreeBSD, if startup script name differs from the "rcvar" #3382

Closed
arsatiki opened this issue Jun 30, 2013 · 4 comments
Labels
bsd BSD community

Comments

@arsatiki
Copy link
Contributor

Setting up a service on FreeBSD requires writing an rcvar line, i.e. "XXX_enabled = yes" to /etc/rc.conf and starting the daemon via startup script via the service tool.

At least for avahi-daemon, the names of the startup script and the rcvar differ. The startup script is called avahi-daemon, but the rcvar is avahi_daemon_enable. This breaks the FreeBSD service module for avahi-daemon.

It is possible to dig up the rcvar with the service command:

[ars@zardoz ~]$ service avahi-daemon rcvar
# avahi_daemon
#
avahi_daemon_enable="YES"
#   (default: "")

[ars@zardoz ~]$ 

The change looks easy enough, so I can provide a pull request once I've had time to work on it. However, I don't have time to work on it for at least for the few next days. If some one else wants to pick this up, feel free.

@mpdehaan
Copy link
Contributor

Thanks, if you can take a crack at this, it would be much appreciated!

@arsatiki
Copy link
Contributor Author

arsatiki commented Jul 2, 2013

As a note to future myself or anyone else investigating this, here's a list of services I've encountered so far that suffer from this issue:

  • avahi-daemon
  • statd
  • lockd

Also possibly sendmail.

@arsatiki
Copy link
Contributor Author

arsatiki commented Jul 2, 2013

Sendmail's situation is more complex. It seems that a single script in rc.d can launch several daemon processes, each which have their own rcvars. So service sendmail rcvar returns this when sendmail is enabled:

# sendmail
#
sendmail_enable="yes"
#   (default: "")

# sendmail_clientmqueue
#
sendmail_enable="yes"
#   (default: "")
sendmail_msp_queue_enable="YES"
#   (default: "")

mpdehaan pushed a commit that referenced this issue Jul 3, 2013
Some services have a knob (i.e. rc.conf setting) whose name
differs from that of the script. For example, lockd process
is controlled with a script called lockd, but the rc.conf
value is rpc_lockd_enable.

Fixes issue #3382.
@mpdehaan
Copy link
Contributor

merged the above so should be able to close this

jimi-c pushed a commit that referenced this issue Dec 6, 2016
Remove need for translate/maketrans due to py3 differences
@dagwieers dagwieers added the bsd BSD community label Jan 18, 2019
@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bsd BSD community
Projects
None yet
Development

No branches or pull requests

3 participants