On Tue, May 05, 2009 at 02:11:57PM +0200, Coert Waagmeester wrote: > I have installed dnsmasq on OpenBSD. > > What is the best way to start it? Should I start it > from /etc/rc.securelevel, or rc.local? > > And how do I call it? just 'dnsmasq' or exec dnsmasq? > > I have googled, but could not find a lot of info on this... > > > Is there a way to 'install' SysV init scripts on OpenBSD?
It's best not to think of this in terms of SysV-style init scripts. In OpenBSD, shell commands in /etc/rc.local get run at boot time, so all you have to do is put some command in there to launch dnsmasq in any fashion that you see fit. So it would suffice to simply add a line with "/usr/local/sbin/dnsmasq"; however, for consistency with the way things are launched in /etc/rc, I generally do something like the following: ,--- /etc/rc.local ----------- if [ X"${dnsmasq_flags-NO}" != X"NO" -a -x /usr/local/sbin/dnsmasq ]; then echo -n ' dnsmasq'; /usr/local/sbin/dnsmasq ${dnsmasq_flags} fi `----------------------------- ,--- /etc/rc.conf.local ------ dnsmasq_flags= `----------------------------- This way, if you want to temporarily disable dnsmasq, you can simply remove the line in rc.conf.local or change it to "dnsmasq_flags=NO". -- Mark Shroyer http://markshroyer.com/contact/