diff options
author | Tony Sarajärvi <tony.sarajarvi@digia.com> | 2014-03-28 09:41:12 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-28 14:13:16 +0100 |
commit | 985422f4c0e45b99a01ed9b08a88833ec5ff9ba9 (patch) | |
tree | 025b3c0637c8258c05ef0441c6a9991a79f74c31 /puppet | |
parent | 4b6f5bb5ab22fb54ffd0da864439421c28741831 (diff) |
Fix Puppet's QNX module to prevent reinstall
Change-Id: I48d4048ffa29c1d3810f209558951e00b45db8c5
Reviewed-by: Heikki Halmet <heikki.halmet@digia.com>
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/modules/qnx/manifests/linux.pp | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/puppet/modules/qnx/manifests/linux.pp b/puppet/modules/qnx/manifests/linux.pp index 96d8c3d..ddac633 100644 --- a/puppet/modules/qnx/manifests/linux.pp +++ b/puppet/modules/qnx/manifests/linux.pp @@ -4,30 +4,41 @@ class qnx::linux { $url = "$input/qnx" $filename = "qnx660.tar.gz" - $target = "/opt" + $target = "/opt/qnx660" - file { "$target": + file { "/opt": ensure => directory, owner => root, group => users, mode => 0755, } + file { "$target": + ensure => directory, + owner => qt, + group => users, + mode => 0755, + } + define qnx_install($filename,$options,$target,$url) { - exec { "install ${filename} to ${target}": - command => "/bin/bash -c 'wget $url/$filename -O - | tar -C $target -$options'", - unless => "/bin/bash -c 'if [ -e ${target} ]'", - require => File["$target"], - timeout => 1800, + exec { "install $filename to $target": + command => "/bin/bash -c 'wget $url/$filename -O - | tar -C $target -$options'", + unless => "/bin/bash -c '/usr/bin/test -d $target'", + require => File["/opt","$target"], + timeout => 1800, } } - qnx_install { - "sdp": - filename => "$filename", - options => "xz", - target => "$target", - url => "$url", - ; + if $::lsbmajdistrelease == 12 { + if $::architecture == amd64 { + qnx_install { + "sdp": + filename => "$filename", + options => "xz --strip-components=1", + target => "$target", + url => "$url", + ; + } + } } } |