Monday, March 24, 2014

in Puppet (and Linux) every slash counts

I was creating a symbolic link:

  file { "/opt/oracle/java/" :
    ensure => link,
    target => "/usr/lib/jvm/java-1.6.0-sun.x86_64/",
  }


on a machine where such a link was already defined, but without the trailing / ( /usr/lib/jvm/java-1.6.0-sun.x86_64 ).
Much to my surprise, Puppet acted on that link by changing it to /usr/lib/jvm/java-1.6.0-sun.x86_64/ (trailing /) ... as there were any difference between the two.

Funnily, Linux itself shows a different entry after the change:
before:
lrwxrwxrwx 1 soa soa 34 Mar 24 18:27 java -> /usr/lib/jvm/java-1.6.0-sun.x86_64
after

lrwxrwxrwx 1 soa soa 34 Mar 24 18:27 java -> /usr/lib/jvm/java-1.6.0-sun.x86_64/

Well.... I think WWII was worse...

No comments: