Bug 213463 - net/isc-dhcp43-server: rc script does not play nice with service -e
Summary: net/isc-dhcp43-server: rc script does not play nice with service -e
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Ryan Steinmetz
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-10-13 21:20 UTC by Miroslav Lachman
Modified: 2017-09-20 12:58 UTC (History)
1 user (show)

See Also:
vlad-fbsd: maintainer-feedback? (zi)
vlad-fbsd: merge-quarterly?


Attachments
Patch to play nice with service -e (1.63 KB, patch)
2016-10-13 21:20 UTC, Miroslav Lachman
no flags Details | Diff
isc-dhcp43-server/files/isc-dhcpd.in with PORTREVISION bump (2.11 KB, patch)
2016-10-17 16:57 UTC, Miroslav Lachman
no flags Details | Diff
poudriere log - success (60.63 KB, text/plain)
2016-10-17 17:00 UTC, Miroslav Lachman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2016-10-13 21:20:35 UTC
Created attachment 175723 [details]
Patch to play nice with service -e

As I reported in PR #207811
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207811
Command "service -e" does not show some services. isc-dhcpd is one of them, because service -e are using eval on some grep output.

name=${name##*/isc-} is not properly evaluated.

There is easy fix I found in rc.d/openvpn and added the same things in to rc.d/isc-dhcpd.

There is also problem with function names starting with word "rcvar":
rcvar_chuser
rcvar_chroot
rcvar_pidnleases
rcvar_rooted

They are renamed to 
_rcvar_chuser
_rcvar_chroot
_rcvar_pidnleases
_rcvar_rooted

You can choose another named not starting with "rcvar"

PS: I am no sure if it is right or not - current isc-dhcpd has load_rc_config ${name} twice. One is after paranoia=yes at the begining of the file and one at the end of file.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2016-10-13 22:04:55 UTC
To which version of the port does this patch apply?
Comment 2 Miroslav Lachman 2016-10-14 01:26:02 UTC
I am sorry. I am using isc-dhcp43-server-4.3.5.

If these changes are acceptable I can create and post patch for net/isc-dhcp43-server/files/isc-dhcpd.in
Comment 3 VK freebsd_triage 2016-10-16 18:22:49 UTC
Thanks for the patch. Please confirm the changes pass QA (portlint, poudriere).
Comment 4 Miroslav Lachman 2016-10-17 16:57:58 UTC
Created attachment 175873 [details]
isc-dhcp43-server/files/isc-dhcpd.in with PORTREVISION bump

Added new patch for net/isc-dhcp43-server/files/isc-dhcpd.in and PORTREVISION_SERVER bump
Comment 5 Miroslav Lachman 2016-10-17 17:00:08 UTC
Created attachment 175874 [details]
poudriere log - success
Comment 6 Miroslav Lachman 2016-11-09 20:17:01 UTC
Can somebody commit the fix, please?
Comment 7 Mathieu Arnold freebsd_committer 2016-12-16 10:13:00 UTC
Maintainer timeout. A lot.
Comment 8 Miroslav Lachman 2017-09-19 14:13:24 UTC
Is it even possible to get this annoying bug fixed? What more should I do?

I created patch, tested patch, posted patch with poudriere log, maintainer timed out and after a year the bug is still here.
Comment 9 commit-hook freebsd_committer 2017-09-20 12:58:52 UTC
A commit references this bug:

Author: zi
Date: Wed Sep 20 12:58:20 UTC 2017
New revision: 450198
URL: https://svnweb.freebsd.org/changeset/ports/450198

Log:
  - Resolve 'service -e' issue

  PR:		213463
  Submitted by:	Miroslav Lachman

Changes:
  head/net/isc-dhcp43-server/Makefile
  head/net/isc-dhcp43-server/files/isc-dhcpd.in