Browse Source

Use line cookbook instead of conf cookbook.

Douglas Thrift 10 years ago
parent
commit
7ab7d7399b
3 changed files with 4 additions and 8 deletions
  1. 0 2
      Berksfile
  2. 1 1
      metadata.rb
  3. 3 5
      recipes/default.rb

+ 0 - 2
Berksfile

@@ -1,5 +1,3 @@
 site :opscode
 
 metadata
-
-cookbook 'conf', github: 'douglaswth-cookbooks/cookbook-conf', branch: 'actually_updated_by_last_action'

+ 1 - 1
metadata.rb

@@ -8,4 +8,4 @@ version          IO.read(File.join(File.dirname(__FILE__), 'VERSION')) rescue '0
 
 supports 'freebsd', '>= 8.4'
 
-depends 'conf', '~> 0.1.1'
+depends 'line', '~> 0.5.1'

+ 3 - 5
recipes/default.rb

@@ -33,11 +33,9 @@ execute 'pkg2ng' do
   only_if '[ -n "`pkg_info 2>/dev/null`" ]'
 end
 
-conf_plain_file '/etc/make.conf' do
-  pattern /^WITH_PKGNG=yes$/
-  new_line 'WITH_PKGNG=yes'
-
-  action :insert_if_no_match
+append_if_no_line '/etc/make.conf WITH_PKGNG=yes' do
+  path '/etc/make.conf'
+  line 'WITH_PKGNG=yes'
 end
 
 ruby_block 'set pkgng provider' do