On Sat, 30 Apr 2011 02:12 -0700, "Sans" <r.sant...@gmail.com> wrote:
> Dear all,
>
> I'm trying to do this. Say for example, I want this link: "liblcgdm.so
> -> liblcgdm.so.1.8.0" to be present on the client only if "lcgdm-
> libs-1.8.0-1sec.sl5" is already listed. I already have this to create
> the link:
>
> file {
> 'liblcgdm.so':
> ensure => symlink,
> name => '/opt/lcg/lib/liblcgdm.so',
> target => 'liblcgdm.so.1.8.0';
> }
>
Not sure if this is the best way to do this, but one approach I would
try would be to use the Exec resource.
As in, have a Exec resource with a command to link the files above, but
which runs only if the file does not already exist. Something along the
lines of the example mentioned here -
http://www.puppetcookbook.com/posts/exec-onlyif.html
Regards,
Rakhesh
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
ldconfig -N
it will update the links for you.
You could try something like (warning untested)
class foo {
package { "liblcgdm":
notify => Exec[ "ldconfig::update" ],
}
include ldconfig::update
}
class ldconfig::update {
exec { "ldconfig -N":
refreshonly => true,
}
}
Of course, the package manager should set up these
links for you when installing the lib.
The other thing to note: If you are installing a library
without using the package manager you should run
ldconfig
anyway, in order to update your loader's idea of
what libraries exist, and where they are.
It also creates any missing links.
again, see ldconfig(8)
--
vagn
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
In that case my suggestion of yesterday should do the trick -
Have a Exec resource with a command to link the files above, but which
runs only if the file does not already exist. Something along the lines
of the example mentioned here -
http://www.puppetcookbook.com/posts/exec-onlyif.html
Regards.
foo.so is normally provided by the foo-devel package.
Why do you need foo.so ?
--
Kind Regards, Markus Falb