From 0d84c91b4047d3da0571d0262b4b5d9a8f9796b9 Mon Sep 17 00:00:00 2001
From: Dennis Camera <dennis.camera@ssrq-sds-fds.ch>
Date: Thu, 20 Feb 2020 22:55:46 +0100
Subject: [PATCH] [explorer/init] Fix unique() for Solaris

---
 cdist/conf/explorer/init | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cdist/conf/explorer/init b/cdist/conf/explorer/init
index db417a14..0f04a0ee 100755
--- a/cdist/conf/explorer/init
+++ b/cdist/conf/explorer/init
@@ -135,7 +135,8 @@ trim() {
 
 unique() {
 	# Delete duplicate lines (keeping input order)
-	awk '!x[$0]++'
+	# NOTE: Solaris AWK breaks without if/print construct.
+	awk '{ if (!x[$0]++) print }'
 }