diff --git a/bin/cdist-config b/bin/cdist-config index 9bba8b93..fd92ca9d 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -26,5 +26,6 @@ : ${CDIST_LIBDIR:=$CDIST_CONFIG/lib} + #echo $CDIST_CONFIG #echo $CDIST_LIBDIR diff --git a/bin/cdist-explore b/bin/cdist-explore index c6a6d529..7a2a3a4e 100755 --- a/bin/cdist-explore +++ b/bin/cdist-explore @@ -19,13 +19,16 @@ # # -reports="hostname os" +#reports="hostname os" . cdist-config -for report in $reports; do - func="cdist_explore_$report" - var="__cdist_$report" +cd ${CDIST_LIBDIR} + +for func in cdist_explore_*; do + #func="cdist_explore_$report" + var="__$func" + . "${CDIST_LIBDIR}/${func}" eval $var=\"\$\($func\)\" eval echo $var=\\\"\$$var\\\" diff --git a/conf/hosts/kr/manifest b/conf/hosts/kr/manifest index 432400af..841578b8 100644 --- a/conf/hosts/kr/manifest +++ b/conf/hosts/kr/manifest @@ -1,2 +1,4 @@ -cdist_package --install vim zsh -cdist_file /etc/issue --source issue +cdist_package_install vim zsh + +#cdist_file /etc/issue --source issue +#cdist_file /etc/issue --via my_func diff --git a/conf/lib/cdist_explore_pkg_system b/conf/lib/cdist_explore_pkg_system new file mode 100755 index 00000000..80151463 --- /dev/null +++ b/conf/lib/cdist_explore_pkg_system @@ -0,0 +1,26 @@ +#!/bin/sh +# +# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# + +cdist_explore_pkg_system() +{ +# case $(cdist_explore_os) + : +} diff --git a/conf/lib/cdist_package b/conf/lib/cdist_package_install similarity index 96% rename from conf/lib/cdist_package rename to conf/lib/cdist_package_install index d7c1e4c6..3d150ec4 100644 --- a/conf/lib/cdist_package +++ b/conf/lib/cdist_package_install @@ -19,7 +19,7 @@ # # -cdist_package() +cdist_package_install() {