[Bug 297573] [NEW PORT] dns/mdns_ws: Convenience port to advertise hosts via mdnsd
| Newsgroups | gmane.os.freebsd.devel.ports.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297573 --- Comment #5 from Benjamin Takacs <[email protected]> --- Looking at the service in more detail, I don't see the point of the mdns_hostname script, why the indirection? why not simply: mdns_ws_start() { /usr/sbin/daemon -p "${pidfile}" -c -u "${mdns_ws_user}" -f "%%LOCALBASE%%/bin/dns-sd" -R "$(hostname)" _workstation._tcp local 9 } ? To support changing the hostname after booting? And do we have a style guide for shell scripts like that service file, * I would expect the `…` syntax for supbrocesses to be forbidden, as it is deprecated in POSIX and $(…) is better, as it supports nesting and is more visible. * And where is mdns_ws_restart ? Shouldn't there one as you have restart_cmd="${name}_restart" ? * Your stop_cmd seems like a worse variant of the stop functionality that comes by default from rc.subr as it doesn't complain when the command isn't even running and does useless work, as daemon already removes the pidfile when the child exits. * you override stop_cmd again, so your first assignment is useless, but by the previous point you probably should just drop both together with the function. * mdns_ws_status seems to do what rc.subr already gives you. * why does this port depend on dns/mdnsd, that seems unused? (mDNSResponder ships a mdnsd service, it seems like you use that) -- You are receiving this mail because: You are the assignee for the bug.