On 2015/01/05 20:55, Bruno Flueckiger wrote: > 1. The port is a daemon. And a daemon needs a rc.d script. So I've > created one according to > http://www.openbsd.org/faq/ports/specialtopics.html#RcScripts > I place it in pkg/udpxy.rc and run make plist. This gives me a > complain: > > make-plist: Bogus element outside of every prefix: /etc/rc.d/udpxy
Others addressed the "make plist" issue - but also relating to this, it seems this software has some funny behaviour where it automatically daemonizes when run by root, but not by a normal user. This is awkward, as in general we would like daemons to run as their own userid where possible (especially those handling network data), I'm not sure how best to handle it in this case - maybe patch, maybe use rc_bg ... As for setting up the userid to run as, you can take a look at examples like telephony/asterisk/pkg/PLIST-main where you'll see an @newuser entry in the plist, this adds the new user at pkg_add time. There's a file, ports/infrastructure/db/user.list, where you can identify the next available uid value. > Is this the best/right way to do it? I can live with either method, but in this case (where it seems unlikely there will be many changes from upstream in later versions), I think do-install is probably simpler.
