Re: pdnsd rc.d script
On Thu, Oct 13, 2011 at 12:06 AM, frantisek holop min...@obiit.org wrote: hi there, please find attached an rc.d script for pdnsd It's wrong: -d should be passed with daemon_flags=-d, so there's no need for a custom rc_start(). ciao, David
Re: pdnsd rc.d script
On Thu, Oct 13, 2011 at 9:16 PM, frantisek holop min...@obiit.org wrote: hmm, on Thu, Oct 13, 2011 at 02:53:06PM +0200, David Coppa said that On Thu, Oct 13, 2011 at 12:06 AM, frantisek holop min...@obiit.org wrote: hi there, please find attached an rc.d script for pdnsd It's wrong: -d should be passed with daemon_flags=-d, so there's no need for a custom rc_start(). indeed. here's another try. please bump revision as well Now it's better. Does pdnsd reload its configuration when you sent a HUP to its process? Otherwise, you want a rc_reload=NO too... ciao, david
Re: pdnsd rc.d script
hmm, on Thu, Oct 13, 2011 at 10:35:07PM +0200, David Coppa said that On Thu, Oct 13, 2011 at 9:16 PM, frantisek holop min...@obiit.org wrote: hmm, on Thu, Oct 13, 2011 at 02:53:06PM +0200, David Coppa said that On Thu, Oct 13, 2011 at 12:06 AM, frantisek holop min...@obiit.org wrote: hi there, please find attached an rc.d script for pdnsd It's wrong: -d should be passed with daemon_flags=-d, so there's no need for a custom rc_start(). indeed. here's another try. please bump revision as well Now it's better. Does pdnsd reload its configuration when you sent a HUP to its process? Otherwise, you want a rc_reload=NO too... third time lucky? -f -- you have 2 choices for dinner -- take it or leave it. #!/bin/sh # # $OpenBSD$ daemon=/usr/local/sbin/pdnsd daemon_flags=-d . /etc/rc.d/rc.subr rc_reload=NO rc_cmd $1
Re: pdnsd rc.d script
On Thu, 13 Oct 2011, frantisek holop wrote: Does pdnsd reload its configuration when you sent a HUP to its process? Otherwise, you want a rc_reload=NO too... third time lucky? I thing it can reload its configuration using 'pdnsd-ctl ...', no? If so you need to provide a custom rc_reload function. Also you don't want to hardcode /usr/local. -- Antoine
Re: pdnsd rc.d script
hmm, on Thu, Oct 13, 2011 at 11:53:28PM +0200, Antoine Jacoutot said that On Thu, 13 Oct 2011, frantisek holop wrote: Does pdnsd reload its configuration when you sent a HUP to its process? Otherwise, you want a rc_reload=NO too... third time lucky? I thing it can reload its configuration using 'pdnsd-ctl ...', no? If so you need to provide a custom rc_reload function. good point Also you don't want to hardcode /usr/local. oh yes. the file has been copied from a live /etc/rc.d/ so that's why it's not TRUEPREFIX. fourth time lucky? :] -f -- vegeterians don't eat food. they eat what food eats. #!/bin/sh # # $OpenBSD$ daemon=${TRUEPREFIX}/sbin/pdnsd daemon_flags=-d . /etc/rc.d/rc.subr rc_reload() { ${TRUEPREFIX}/sbin/pdnsd-ctl config } rc_cmd $1