Re: resolvconf needs @RESTARTCMD@ to be replaced after r303062

2016-08-01 Thread Guy Yur
On Sun, Jul 31, 2016 at 9:09 PM, Pedro Giffuni  wrote:
>
>
> On 07/31/16 11:56, Guy Yur wrote:
>>
>> Hi,
>>
>> I meant for the RESTARTCMD_= statement to be added too.
>> I should have sent a patch file.
>>
>
> Ugh ... yeah I am really bad at "guessing" patches.
>
> I will play with your patch. Thanks.
>
> Pedro.

Thanks.

fix for pdns_recursor was applied upstream.
http://roy.marples.name/projects/openresolv/info/4bb3467d4ac799f2

When a new openresolv release is made it will be possible to
drop the _WITH_ARG vars.

Guy.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: resolvconf needs @RESTARTCMD@ to be replaced after r303062

2016-07-31 Thread Pedro Giffuni



On 07/31/16 11:56, Guy Yur wrote:

On Sun, Jul 31, 2016 at 5:46 AM, Pedro Giffuni  wrote:




Index: sbin/resolvconf/Makefile
===
--- sbin/resolvconf/Makefile(revision 303557)
+++ sbin/resolvconf/Makefile(working copy)
@@ -30,6 +30,7 @@
-e 's:@LIBEXECDIR@:${FILESDIR}:g' \
-e 's:@VARDIR@:${VARDIR}:g' \
-e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \
+   -e 's:@RESTARTCMD@:${RESTARTCMD}:g' \
-e 's:@RCDIR@:${RCDIR}:g' \
-e 's: vpn : ng[0-9]*&:g' \
${DIST}/$@.in > $@





And the underscore was not a typo.
Thanks Guy!

Pedro.


Hi,

I meant for the RESTARTCMD_= statement to be added too.
I should have sent a patch file.



Ugh ... yeah I am really bad at "guessing" patches.

I will play with your patch. Thanks.

Pedro.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: resolvconf needs @RESTARTCMD@ to be replaced after r303062

2016-07-31 Thread Guy Yur
On Sun, Jul 31, 2016 at 5:46 AM, Pedro Giffuni  wrote:
>
>
>>> Index: sbin/resolvconf/Makefile
>>> ===
>>> --- sbin/resolvconf/Makefile(revision 303557)
>>> +++ sbin/resolvconf/Makefile(working copy)
>>> @@ -30,6 +30,7 @@
>>> -e 's:@LIBEXECDIR@:${FILESDIR}:g' \
>>> -e 's:@VARDIR@:${VARDIR}:g' \
>>> -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \
>>> +   -e 's:@RESTARTCMD@:${RESTARTCMD}:g' \
>>> -e 's:@RCDIR@:${RCDIR}:g' \
>>> -e 's: vpn : ng[0-9]*&:g' \
>>> ${DIST}/$@.in > $@
>>
>>
>
> And the underscore was not a typo.
> Thanks Guy!
>
> Pedro.

Hi,

I meant for the RESTARTCMD_= statement to be added too.
I should have sent a patch file.

Issue could be seen during boot if using dhcpcd which invokes resolvconf
or by running 'resolvconf -r SERVICENAME'

With r303567, RESTARTCMD is now empty in the script so
dynamic detection for service command is done.

Attaching new patch.

1.
Renaming RESTARTCMD, CMD1, CMD2 to _WITH_ARG since it is only
used by pdns_recursor.in.
The other files have all moved to use $RESTARTCMD passed from resolvconf.

I will send a patch upstream to do the same for pdns_recursor.in.
The ugly _WITH_ARG vars can be removed when pdns_recursor.in
is updated to new style.

2.
Renaming RESTARTCMD_ to RESTARTCMD and adding the lines for
new CMD1, CMD2, RESTARTCMD statements.


Thanks,
Guy


resolvconf_RESTARTCMD.patch
Description: Binary data
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: resolvconf needs @RESTARTCMD@ to be replaced after r303062

2016-07-30 Thread Pedro Giffuni



On 07/30/16 21:35, Glen Barber wrote:
...



I don't see the error message though. so I need some confirmation that
this fixes the issue.



Likewise, I do not see the error either, so would like definitive
confirmation the patch resolves the issue.



OK, I don't see the error message but I can reproduce it:

 % grep @RESTARTCMD@ *
resolvconf:RESTARTCMD=@RESTARTCMD@



Index: sbin/resolvconf/Makefile
===
--- sbin/resolvconf/Makefile(revision 303557)
+++ sbin/resolvconf/Makefile(working copy)
@@ -30,6 +30,7 @@
-e 's:@LIBEXECDIR@:${FILESDIR}:g' \
-e 's:@VARDIR@:${VARDIR}:g' \
-e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \
+   -e 's:@RESTARTCMD@:${RESTARTCMD}:g' \
-e 's:@RCDIR@:${RCDIR}:g' \
-e 's: vpn : ng[0-9]*&:g' \
${DIST}/$@.in > $@




And the underscore was not a typo.
Thanks Guy!

Pedro.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: resolvconf needs @RESTARTCMD@ to be replaced after r303062

2016-07-30 Thread Glen Barber
On Sat, Jul 30, 2016 at 08:40:02PM -0500, Pedro Giffuni wrote:
> (CC'ing Glen for review, since he was the last to touch that file and
> may know better).
> 

Unfortunately, I don't know better.  I only touched the file last in
order to close a PR prior to the final 10.2-RELEASE (if I remember
correctly).

> Hi Guy;
> 
> 
> On 07/30/16 17:37, Guy Yur wrote:
> >Hi,
> >
> >openresolv 3.8.1 added RESTARTCMD=@RESTARTCMD@ in
> >contrib/openresolv/resolvconf.in.
> >It is not replaced by the sed expressions in sbin/resolvconf/Makefile.
> >
> >Error seen is "eval: @RESTARTCMD@: not found".
> >
> >Current @RESTARTCMD \(.*\)@ sed expression needs to be kept for
> >pdns_recursor.in and a new expression added to replace @RESTARTCMD@.
> >
> 
> I see, you mean here:
> 
> https://svnweb.freebsd.org/base/head/sbin/resolvconf/Makefile?revision=298107=markup#l32
> 
> >The following worked for me:
> >RESTARTCMD_="/usr/sbin/service \\$$1 onestatus >/dev/null 2>\&1
> >\&\& /usr/sbin/service \\$$1 restart"
> >
> >sed ... \
> >  ... \
> >  -e 's:@RESTARTCMD@:${RESTARTCMD_}:g' \
> >  ...
> 
> And perhaps something like the attached patch (is the underscore
> a typo?).
> 
> I don't see the error message though. so I need some confirmation that
> this fixes the issue.
> 

Likewise, I do not see the error either, so would like definitive
confirmation the patch resolves the issue.

> Index: sbin/resolvconf/Makefile
> ===
> --- sbin/resolvconf/Makefile  (revision 303557)
> +++ sbin/resolvconf/Makefile  (working copy)
> @@ -30,6 +30,7 @@
>   -e 's:@LIBEXECDIR@:${FILESDIR}:g' \
>   -e 's:@VARDIR@:${VARDIR}:g' \
>   -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \
> + -e 's:@RESTARTCMD@:${RESTARTCMD}:g' \
>   -e 's:@RCDIR@:${RCDIR}:g' \
>   -e 's: vpn : ng[0-9]*&:g' \
>   ${DIST}/$@.in > $@

Glen



signature.asc
Description: PGP signature


Re: resolvconf needs @RESTARTCMD@ to be replaced after r303062

2016-07-30 Thread Pedro Giffuni

(CC'ing Glen for review, since he was the last to touch that file and
may know better).

Hi Guy;


On 07/30/16 17:37, Guy Yur wrote:

Hi,

openresolv 3.8.1 added RESTARTCMD=@RESTARTCMD@ in
contrib/openresolv/resolvconf.in.
It is not replaced by the sed expressions in sbin/resolvconf/Makefile.

Error seen is "eval: @RESTARTCMD@: not found".

Current @RESTARTCMD \(.*\)@ sed expression needs to be kept for
pdns_recursor.in and a new expression added to replace @RESTARTCMD@.



I see, you mean here:

https://svnweb.freebsd.org/base/head/sbin/resolvconf/Makefile?revision=298107=markup#l32


The following worked for me:
RESTARTCMD_="/usr/sbin/service \\$$1 onestatus >/dev/null 2>\&1
\&\& /usr/sbin/service \\$$1 restart"

sed ... \
  ... \
  -e 's:@RESTARTCMD@:${RESTARTCMD_}:g' \
  ...


And perhaps something like the attached patch (is the underscore
a typo?).

I don't see the error message though. so I need some confirmation that
this fixes the issue.

Pedro.
Index: sbin/resolvconf/Makefile
===
--- sbin/resolvconf/Makefile	(revision 303557)
+++ sbin/resolvconf/Makefile	(working copy)
@@ -30,6 +30,7 @@
 		-e 's:@LIBEXECDIR@:${FILESDIR}:g' \
 		-e 's:@VARDIR@:${VARDIR}:g' \
 		-e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \
+		-e 's:@RESTARTCMD@:${RESTARTCMD}:g' \
 		-e 's:@RCDIR@:${RCDIR}:g' \
 		-e 's: vpn : ng[0-9]*&:g' \
 		${DIST}/$@.in > $@
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

resolvconf needs @RESTARTCMD@ to be replaced after r303062

2016-07-30 Thread Guy Yur
Hi,

openresolv 3.8.1 added RESTARTCMD=@RESTARTCMD@ in
contrib/openresolv/resolvconf.in.
It is not replaced by the sed expressions in sbin/resolvconf/Makefile.

Error seen is "eval: @RESTARTCMD@: not found".

Current @RESTARTCMD \(.*\)@ sed expression needs to be kept for
pdns_recursor.in and a new expression added to replace @RESTARTCMD@.

The following worked for me:
RESTARTCMD_="/usr/sbin/service \\$$1 onestatus >/dev/null 2>\&1
\&\& /usr/sbin/service \\$$1 restart"

sed ... \
  ... \
  -e 's:@RESTARTCMD@:${RESTARTCMD_}:g' \
  ...

Regards,
Guy
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"