Merge branch 'master' into 'fix/type/__locale_system/version-cmp'
# Conflicts: # cdist/conf/type/__locale_system/manifest
This commit is contained in:
commit
fa967631e3
6 changed files with 31 additions and 5 deletions
|
@ -144,7 +144,8 @@ esac
|
|||
|
||||
if [ -f /etc/os-release ]; then
|
||||
# after sles15, suse don't provide an /etc/SuSE-release anymore, but there is almost no difference between sles and opensuse leap, so call it suse
|
||||
if grep -q ^ID_LIKE=\"suse\" /etc/os-release 2>/dev/null; then
|
||||
if (. /etc/os-release && echo "${ID_LIKE}" | grep -q '\(^\|\ \)suse\($\|\ \)')
|
||||
then
|
||||
echo suse
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -18,16 +18,16 @@
|
|||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
os=$("$__explorer/os")
|
||||
os=$("${__explorer:?}/os")
|
||||
|
||||
if [ -f "$__object/parameter/device" ]; then
|
||||
if [ -f "${__object:?}/parameter/device" ]; then
|
||||
blkdev="$(cat "$__object/parameter/device")"
|
||||
else
|
||||
blkdev="$__object_id"
|
||||
blkdev="${__object_id:?}"
|
||||
fi
|
||||
|
||||
case "$os" in
|
||||
centos|fedora|redhat|suse|gentoo)
|
||||
alpine|centos|fedora|redhat|suse|gentoo)
|
||||
if [ ! -x "$(command -v lsblk)" ]; then
|
||||
echo "lsblk is required for __filesystem type" >&2
|
||||
exit 1
|
||||
|
|
|
@ -23,6 +23,13 @@ case "$src" in
|
|||
|
||||
cmd="$cmd --strip-components=$tar_strip"
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/tar-extra-args" ]
|
||||
then
|
||||
tar_extra_args="$( cat "$__object/parameter/tar-extra-args" )"
|
||||
|
||||
cmd="$cmd $tar_extra_args"
|
||||
fi
|
||||
;;
|
||||
*.7z)
|
||||
case "$os" in
|
||||
|
|
|
@ -33,6 +33,10 @@ sum-file
|
|||
tar-strip
|
||||
Tarball specific. See ``man tar`` for ``--strip-components``.
|
||||
|
||||
tar-extra-args
|
||||
Tarball sepcific. Append additional arguments to ``tar`` command.
|
||||
See ``man tar`` for possible arguments.
|
||||
|
||||
|
||||
OPTIONAL BOOLEAN PARAMETERS
|
||||
---------------------------
|
||||
|
@ -65,6 +69,13 @@ EXAMPLES
|
|||
--preserve-archive \
|
||||
--destination /opt/cpma/server
|
||||
|
||||
# example usecase for --tar-* args
|
||||
__unpack /root/strelaysrv.tar.gz \
|
||||
--preserve-archive \
|
||||
--destination /usr/local/bin \
|
||||
--tar-strip 1 \
|
||||
--tar-extra-args '--wildcards "*/strelaysrv"'
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
sum-file
|
||||
tar-strip
|
||||
tar-extra-args
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
Changelog
|
||||
---------
|
||||
|
||||
next:
|
||||
* Type __locale_system: Fix for debian and ubuntu (Ander Punnar)
|
||||
* Type __unpack: Add --tar-extra-args parameter (Ander Punnar)
|
||||
* Explorer os: Fix OS detection for openSUSE (Dennis Camera)
|
||||
* Type __filesystem: Support Alpine Linux (Joachim Desroches)
|
||||
|
||||
6.7.0: 2020-07-28
|
||||
* Delete deprecated type: __pf_apply (Darko Poljak)
|
||||
* New type: __download (Ander Punnar)
|
||||
|
|
Loading…
Reference in a new issue