# File lib/puppet/type/zone.rb, line 16
16:     def configtext
17:       list = @should
18: 
19:       current_value = self.retrieve
20: 
21:       unless current_value.is_a? Symbol
22:         if current_value.is_a? Array
23:           list += current_value
24:         else
25:           list << current_value if current_value
26:         end
27:       end
28: 
29:       # Some hackery so we can test whether current_value is an array or a symbol
30:       if current_value.is_a? Array
31:         tmpis = current_value
32:       else
33:         if current_value
34:           tmpis = [current_value]
35:         else
36:           tmpis = []
37:         end
38:       end
39: 
40:       rms = []
41:       adds = []
42: 
43:       # Collect the modifications to make
44:       list.sort.uniq.collect do |obj|
45:         # Skip objectories that are configured and should be
46:         next if tmpis.include?(obj) and @should.include?(obj)
47: 
48:         if tmpis.include?(obj)
49:           rms << obj
50:         else
51:           adds << obj
52:         end
53:       end
54: 
55: 
56:       # And then perform all of the removals before any of the adds.
57:       (rms.collect { |o| rm(o) } + adds.collect { |o| add(o) }).join("\n")
58:     end