diff --git a/cdist/conf/type/__package_pkg_openbsd/explorer/pkg_version b/cdist/conf/type/__package_pkg_openbsd/explorer/pkg_version index bc23a85d..212f0d96 100755 --- a/cdist/conf/type/__package_pkg_openbsd/explorer/pkg_version +++ b/cdist/conf/type/__package_pkg_openbsd/explorer/pkg_version @@ -1,6 +1,7 @@ #!/bin/sh # # 2011 Andi Brönnimann (andi-cdist at v-net.ch) +# Copyright 2017, Philippe Gregoire # # This file is part of cdist. # @@ -28,4 +29,4 @@ else fi #TODO: Is there a better way? -pkg_info | grep "$name" | sed 's .*\(-[0-9.][0-9.]*\).* \1 ' | sed 's/-//' +pkg_info | grep "^$name-[0-9]" | sed 's|.*\(-[0-9][0-9.]*\).*|\1|' | sed 's/-//'