From: Stephen Gran Date: Fri, 6 Apr 2012 05:20:19 +0000 (+0100) Subject: not basename X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=4c8914fcf7250350f39ba26cf25c6f817afa6ddb;p=mirror%2Fdsa-puppet.git not basename Signed-off-by: Stephen Gran --- diff --git a/modules/site/manifests/alternative.pp b/modules/site/manifests/alternative.pp index d7488bee3..1a40c1575 100644 --- a/modules/site/manifests/alternative.pp +++ b/modules/site/manifests/alternative.pp @@ -3,7 +3,7 @@ define site::alternative ($linkto, $ensure = present) { present: { if $::lsbdistcodename == 'lenny' { exec { "/usr/sbin/update-alternatives --set ${name} ${linkto}": - unless => "[ $(basename $(readlink -f /etc/alternatives/${name})) = ${linkto} ]", + unless => "[ $(readlink -f /etc/alternatives/${name}) = ${linkto} ]", } } else { exec { "/usr/sbin/update-alternatives --set ${name} ${linkto}": @@ -14,7 +14,7 @@ define site::alternative ($linkto, $ensure = present) { absent: { if $::lsbdistcodename == 'lenny' { exec { "/usr/sbin/update-alternatives --remove ${name} ${linkto}": - unless => "[ $(basename $(readlink -f /etc/alternatives/${name})) != ${linkto} ]", + unless => "[ $(readlink -f /etc/alternatives/${name}) != ${linkto} ]", } } else { exec { "/usr/sbin/update-alternatives --remove ${name} ${linkto}":