Permalink
Browse files

cook-189, use 0.7.10+ notation for setting attributes (default)

  • Loading branch information...
jtimberman committed Sep 28, 2009
1 parent 34e5eac commit 12d662c4ff02ec3dc3abe7da97482429c0ee8ef3
Showing with 11 additions and 12 deletions.
  1. +11 −12 attributes/djbdns.rb
View
@@ -18,29 +18,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-djbdns Mash.new unless attribute?("djbdns")
-djbdns[:tinydns_ipaddress] = "127.0.0.1" unless djbdns.has_key?(:tinydns_ipaddress)
-djbdns[:tinydns_internal_ipaddress] = "127.0.0.1" unless djbdns.has_key?(:tinydns_internal_ipaddress)
-djbdns[:axfrdns_ipaddress] = "127.0.0.1" unless djbdns.has_key?(:axfrdns_ipaddress)
-djbdns[:public_dnscache_ipaddress] = ipaddress unless djbdns.has_key?(:public_dnscache_ipaddress)
+default[:djbdns][:tinydns_ipaddress] = "127.0.0.1"
+default[:djbdns][:tinydns_internal_ipaddress] = "127.0.0.1"
+default[:djbdns][:public_dnscache_ipaddress] = ipaddress
+default[:djbdns][:axfrdns_ipaddress] = "127.0.0.1"
-djbdns[:public_dnscache_allowed_networks] = [ipaddress.split(".")[0,2].join(".")] unless djbdns.has_key?(:public_dnscache_allowed_networks)
-djbdns[:tinydns_internal_resolved_domain] = domain unless djbdns.has_key?(:tinydns_internal_resolved_domain)
+default[:djbdns][:public_dnscache_allowed_networks] = [ipaddress.split(".")[0,2].join(".")]
+default[:djbdns][:tinydns_internal_resolved_domain] = domain
case platform
when "ubuntu"
if platform_version >= "8.10"
- djbdns[:bin_dir] = "/usr/bin"
+ set[:djbdns][:bin_dir] = "/usr/bin"
else
- djbdns[:bin_dir] = "/usr/local/bin"
+ set[:djbdns][:bin_dir] = "/usr/local/bin"
end
when "debian"
if platform_version >= "5.0"
- djbdns[:bin_dir] = "/usr/bin"
+ set[:djbdns][:bin_dir] = "/usr/bin"
else
- djbdns[:bin_dir] = "/usr/local/bin"
+ set[:djbdns][:bin_dir] = "/usr/local/bin"
end
else
- djbdns[:bin_dir] = "/usr/local/bin"
+ set[:djbdns][:bin_dir] = "/usr/local/bin"
end

0 comments on commit 12d662c

Please sign in to comment.