Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Add a binary_indicator parameter for the usage of $digest_string.
Browse files Browse the repository at this point in the history
The hash commands on OpenBSD don't distinguish between binary
and text files, so they don't handle the '*' in front of the
file name to be checked.

additionally update metadata.json for more current OpenBSD versions
  • Loading branch information
buzzdeee committed Aug 30, 2016
1 parent 82fc829 commit d75c797
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifests/download.pp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
'present': {
file {"${src_target}/${name}.${digest_type}":
ensure => $ensure,
content => "${digest_string} *${name}",
content => "${digest_string} ${::archive::params::binary_indicator}${name}",
owner => $user,
notify => Exec["download archive ${name} and check sum"],
}
Expand Down
2 changes: 2 additions & 0 deletions manifests/extract.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
},
) {

require ::archive::params

if $root_dir {
$extract_dir = "${target}/${root_dir}"
} else {
Expand Down
2 changes: 2 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'sha256' => 'sha256',
'sha512' => 'sha512',
}
$binary_indicator = undef
}
default: {
$tarcmd = 'tar'
Expand All @@ -23,6 +24,7 @@
'sha384' => 'sha384sum',
'sha512' => 'sha512sum',
}
$binary_indicator = '*'
}
}
}
5 changes: 4 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
{
"operatingsystem": "OpenBSD",
"operatingsystemrelease": [
"5.7"
"5.7",
"5.8",
"5.9",
"6.0"
]
},
{
Expand Down

0 comments on commit d75c797

Please sign in to comment.