All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Andryuk <jason.p.andryuk@aero.org>
To: Ian Campbell <Ian.Campbell@citrix.com>,
	Sylvain Munaut <s.munaut@whatever-company.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH 5/5] hotplug/linux: Add IPv6 support to vif-route
Date: Fri, 16 May 2014 15:17:21 -0400	[thread overview]
Message-ID: <53766441.50008@aero.org> (raw)
In-Reply-To: <1400170848.883.16.camel@kazak.uk.xensource.com>

On 5/15/2014 12:20 PM, Ian Campbell wrote:
> On Wed, 2014-05-14 at 17:23 +0200, Sylvain Munaut wrote:
>> Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
>> ---
>>   tools/hotplug/Linux/vif-common.sh |   33 +++++++++++++++++++++++++++++++++
>>   tools/hotplug/Linux/vif-route     |   20 +++++++++++++++++++-
>>   2 files changed, 52 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/hotplug/Linux/vif-common.sh b/tools/hotplug/Linux/vif-common.sh
>> index 2f24274..cd341a33 100644
>> --- a/tools/hotplug/Linux/vif-common.sh
>> +++ b/tools/hotplug/Linux/vif-common.sh
>> @@ -324,3 +324,36 @@ dom0_ip()
>>     fi
>>     echo "$result"
>>   }
>> +
>> +
>> +##
>> +# ip6_of interface
>> +#
>> +# Print the first IPv6 address currently in use at the given interface, or nothing if
>> +# the interface is not up.
>> +#
>> +ip6_of()
>> +{
>> +        ip -6 addr show primary dev "$1" | perl -wane '/scope global/ && /inet6 (([0-9a-f]+:*)+)/ && print $1;'
> 
> Hrm, Perl again. Can this be done with awk? Looks tricky though.

Something like:
awk '/inet6 .* scope global/ { split($2, v6, "/"); print v6[1] }'

(Removing perl from locking.sh would be nice, since it's a large requirement for the one use.)

Regards,

Jason

  reply	other threads:[~2014-05-16 19:18 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 15:23 Improvement to linux/hotplug scripts Sylvain Munaut
2014-05-14 15:23 ` [PATCH 1/5] hotplug/linux: Fix the vif script to handle_iptable for tap interfaces Sylvain Munaut
2014-05-14 17:08   ` Roger Pau Monné
2014-05-15 15:53     ` Ian Campbell
2014-05-16  8:53       ` Sylvain Munaut
2014-05-14 15:23 ` [PATCH 2/5] hotplug/linux: Add an option to disable acceleration on VIF Sylvain Munaut
2014-05-15 15:57   ` Ian Campbell
2014-05-20  7:55     ` Sylvain Munaut
2014-05-20  9:10       ` Ian Campbell
2014-05-14 15:23 ` [PATCH 3/5] hotplug/linux: Improve iptables logic Sylvain Munaut
2014-05-15 16:15   ` Ian Campbell
2014-05-20  8:02     ` Sylvain Munaut
2014-05-20  9:17       ` Ian Campbell
2014-05-20 11:23         ` Sylvain Munaut
2014-05-20 11:28           ` Ian Campbell
2014-05-14 15:23 ` [PATCH 4/5] hotplug/linux: Add IPv6 support to the " Sylvain Munaut
2014-05-15 16:19   ` Ian Campbell
2014-05-15 16:23     ` Ian Campbell
2014-05-20 11:58     ` Sylvain Munaut
2014-05-20 12:24       ` Ian Campbell
2014-05-20 13:11         ` Sylvain Munaut
2014-05-20 13:54           ` Ian Campbell
2014-05-20 12:32       ` configuring vif options to be consumed by hotplug scripts (Was: Re: [PATCH 4/5] hotplug/linux: Add IPv6 support to the iptables logic) Ian Campbell
2014-05-16 18:13   ` [PATCH 4/5] hotplug/linux: Add IPv6 support to the iptables logic Jacek Konieczny
2014-05-16 19:33     ` Sylvain Munaut
2014-05-16 19:47       ` Jacek Konieczny
2014-05-14 15:23 ` [PATCH 5/5] hotplug/linux: Add IPv6 support to vif-route Sylvain Munaut
2014-05-15 16:20   ` Ian Campbell
2014-05-16 19:17     ` Jason Andryuk [this message]
2014-05-16 19:19       ` Sylvain Munaut
2014-05-20  8:06     ` Sylvain Munaut
2014-05-20  9:20       ` Ian Campbell
2014-05-20 11:17         ` Sylvain Munaut
2014-05-20 11:27           ` Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2017-01-24 16:49 [PATCH 0/5] Various improvements for the VIF linux hotplug scripts Sylvain Munaut
2017-01-24 16:49 ` [PATCH 5/5] hotplug/linux: Add IPv6 support to vif-route Sylvain Munaut
2017-01-24 17:45   ` Ian Jackson
2017-01-24 17:57     ` Sylvain Munaut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53766441.50008@aero.org \
    --to=jason.p.andryuk@aero.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=s.munaut@whatever-company.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.