Closed utdrmac closed 9 years ago
https://github.com/jayjanssen/vagrant-percona/blob/master/modules/base/manifests/hostname.pp#L5
[root@ip-10-229-62-77 ~]# test `hostname` = $vagrant_hostname
-bash: test: ip-10-229-62-77.us-west-1.compute.internal: unary operator expected
Suggested fix:
[root@ip-10-229-62-77 ~]# test "`hostname`" = "$vagrant_hostname"
[root@ip-10-229-62-77 ~]# echo $?
1
This is git, submit a pull request with your proposed fix :)
On Tue, Jul 7, 2015 at 6:54 PM, Matthew notifications@github.com wrote:
https://github.com/jayjanssen/vagrant-percona/blob/master/modules/base/manifests/hostname.pp#L5
[root@ip-10-229-62-77 ~]# test
hostname
= $vagrant_hostname -bash: test: ip-10-229-62-77.us-west-1.compute.internal: unary operator expectedSuggested fix:
[root@ip-10-229-62-77 ~]# test "
hostname
" = "$vagrant_hostname" [root@ip-10-229-62-77 ~]# echo $? 1— Reply to this email directly or view it on GitHub https://github.com/jayjanssen/vagrant-percona/issues/18#issuecomment-119366897 .
Jay Janssen Managing Consultant, Percona https://about.me/jay.janssen
This command is being passed through puppet, where $vagrant_hostname should get interpolated to a string. I don't think we need the quotes (this works on my vagrant-percona on centos 7 just fine anyway)
On Wed, Jul 8, 2015 at 8:28 AM, Jay Janssen jay.janssen@percona.com wrote:
This is git, submit a pull request with your proposed fix :)
On Tue, Jul 7, 2015 at 6:54 PM, Matthew notifications@github.com wrote:
https://github.com/jayjanssen/vagrant-percona/blob/master/modules/base/manifests/hostname.pp#L5
[root@ip-10-229-62-77 ~]# test
hostname
= $vagrant_hostname -bash: test: ip-10-229-62-77.us-west-1.compute.internal: unary operator expectedSuggested fix:
[root@ip-10-229-62-77 ~]# test "
hostname
" = "$vagrant_hostname" [root@ip-10-229-62-77 ~]# echo $? 1— Reply to this email directly or view it on GitHub https://github.com/jayjanssen/vagrant-percona/issues/18#issuecomment-119366897 .
Jay Janssen Managing Consultant, Percona https://about.me/jay.janssen
Jay Janssen Managing Consultant, Percona https://about.me/jay.janssen
https://github.com/jayjanssen/vagrant-percona/blob/master/lib/vagrant-common.rb#L189
I must have missed this on your master branch at first glance cause I had to add these lines to my branch. hostname was not being fixed on repeat provisioning so trying to figure that out.
and having to do a complete fork to my own repo just to patch 1 line is one of the dumbest, most innefficient things about git (unless there's some other, easier, shorter way that i'm unaware of)
vagrant-percona/modules/base/manifests/hostname.pp
On CentOS 6.6 -> /bin/hostname