diff options
-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", + ; + } + } } } |