From 7ccfad99d929b3aa18be9f61bde472f4570ca1e0 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 7 Mar 2010 20:24:16 +0000 Subject: [PATCH] handle lack of v6 addresses nicely Signed-off-by: Stephen Gran --- facts/ipaddresses.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/facts/ipaddresses.rb b/facts/ipaddresses.rb index a80fa6be3..17dbd84ae 100644 --- a/facts/ipaddresses.rb +++ b/facts/ipaddresses.rb @@ -23,8 +23,12 @@ Facter.add("v6ips") do addrs << $1 end end + ret = addrs.join(",") + if ret.empty? + ret = 'no' + end setcode do - addrs.join(",") + ret end end -- 2.20.1