Skip to content

Commit

Permalink
ISSUE: Rpm install fails
Browse files Browse the repository at this point in the history
Added a fix for ISSUE #2 where vmware-open-vm-tools-common installation
fails due to existance of /usr/lib/vmware-tools from a previous vmware
tools tarball install.  Updated the rspec tests as well.
  • Loading branch information
razorsedge committed Apr 14, 2012
1 parent 885d8ab commit b3869c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,16 @@
}

exec { 'vmware-uninstall-tools':
command => '/usr/bin/vmware-uninstall-tools.pl',
command => '/usr/bin/vmware-uninstall-tools.pl && rm -rf /usr/lib/vmware-tools',
path => '/bin:/sbin:/usr/bin:/usr/sbin',
onlyif => 'test -f /usr/bin/vmware-uninstall-tools.pl',
before => [ Package['vmware-tools'], Package['VMwareTools'], ],
}

# TODO: remove Exec["vmware-uninstall-tools-local"]
exec { 'vmware-uninstall-tools-local':
command => '/usr/local/bin/vmware-uninstall-tools.pl',
command => '/usr/local/bin/vmware-uninstall-tools.pl && rm -rf /usr/local/lib/vmware-tools',
path => '/bin:/sbin:/usr/bin:/usr/sbin',
onlyif => 'test -f /usr/local/bin/vmware-uninstall-tools.pl',
before => [ Package['vmware-tools'], Package['VMwareTools'], ],
}
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/vmwaretools_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
it 'should remove Package[VMwareTools]' do
should contain_package('VMwareTools').with_ensure('absent')
end
it { should contain_exec('vmware-uninstall-tools').with_command('/usr/bin/vmware-uninstall-tools.pl') }
it { should contain_exec('vmware-uninstall-tools-local').with_command('/usr/local/bin/vmware-uninstall-tools.pl') }
it { should contain_exec('vmware-uninstall-tools').with_command('/usr/bin/vmware-uninstall-tools.pl && rm -rf /usr/lib/vmware-tools') }
it { should contain_exec('vmware-uninstall-tools-local').with_command('/usr/local/bin/vmware-uninstall-tools.pl && rm -rf /usr/local/lib/vmware-tools') }
it { should contain_service('vmware-tools').with_pattern('vmtoolsd') }
end
end
Expand Down

0 comments on commit b3869c5

Please sign in to comment.