From 4c8914fcf7250350f39ba26cf25c6f817afa6ddb Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Fri, 6 Apr 2012 06:20:19 +0100 Subject: [PATCH] not basename Signed-off-by: Stephen Gran --- modules/site/manifests/alternative.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}": -- 2.20.1