Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Grep by word for DB Name
Browse files Browse the repository at this point in the history
Say you create database `foo` and later create `foobar`
without `grep -w` the grep will match `foo` and not create `foobar`. With word matching it will.
  • Loading branch information
paulcollinsiii committed Aug 20, 2013
1 parent 4c2b90b commit 2017213
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/db.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
creates => "${mysql::config::datadir}/${name}",
require => Exec['wait-for-mysql'],
unless => "mysql -uroot -p13306 -e 'show databases' \
--password='' | grep '${name}'"
--password='' | grep -w '${name}'"
}
} elsif $ensure == 'absent' {
exec { "delete mysql db ${name}":
Expand Down

0 comments on commit 2017213

Please sign in to comment.