simplify
[mirror/dsa-puppet.git] / modules / roles / templates / static-mirroring / static-update-component.erb
index 9844a5a..d00d749 100755 (executable)
@@ -42,9 +42,7 @@ if [ -z "$srchost" ] || [ -z "$srcdir" ]; then
   exit 1
 fi
 
-if [ "$srchost" = "`hostname -f`" ]; then
-  src="$srcdir"
-else
+if ! [ "$srchost" = "`hostname -f`" ]; then
   echo >&2 "Component $component is sourced from $srchost, not this host."
   exit 1
 fi
@@ -63,7 +61,7 @@ lines = []
 masters = []
 scope.lookupvar('site::localinfo').keys.sort.each do |node|
     if scope.lookupvar('site::localinfo')[node]['static_master']
-        line << "masters+=(\"#{node}\"}"
+        lines << "masters+=(\"#{node}\"}"
     end
 end
 lines.join("\n")