forked from ungleich-public/cdist
		
	dynamic load new explorers
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								25806d425e
							
						
					
				
			
			
				commit
				
					
						f65c78deb6
					
				
			
		
					 5 changed files with 39 additions and 7 deletions
				
			
		| 
						 | 
					@ -26,5 +26,6 @@
 | 
				
			||||||
: ${CDIST_LIBDIR:=$CDIST_CONFIG/lib}
 | 
					: ${CDIST_LIBDIR:=$CDIST_CONFIG/lib}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#echo $CDIST_CONFIG
 | 
					#echo $CDIST_CONFIG
 | 
				
			||||||
#echo $CDIST_LIBDIR
 | 
					#echo $CDIST_LIBDIR
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,13 +19,16 @@
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
reports="hostname os"
 | 
					#reports="hostname os"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. cdist-config
 | 
					. cdist-config
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for report in $reports; do
 | 
					cd ${CDIST_LIBDIR}
 | 
				
			||||||
   func="cdist_explore_$report"
 | 
					
 | 
				
			||||||
   var="__cdist_$report"
 | 
					for func in cdist_explore_*; do
 | 
				
			||||||
 | 
					   #func="cdist_explore_$report"
 | 
				
			||||||
 | 
					   var="__$func"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   . "${CDIST_LIBDIR}/${func}"
 | 
					   . "${CDIST_LIBDIR}/${func}"
 | 
				
			||||||
   eval $var=\"\$\($func\)\"
 | 
					   eval $var=\"\$\($func\)\"
 | 
				
			||||||
   eval echo $var=\\\"\$$var\\\"
 | 
					   eval echo $var=\\\"\$$var\\\"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,2 +1,4 @@
 | 
				
			||||||
cdist_package --install vim zsh
 | 
					cdist_package_install vim zsh
 | 
				
			||||||
cdist_file /etc/issue --source issue
 | 
					
 | 
				
			||||||
 | 
					#cdist_file /etc/issue --source issue
 | 
				
			||||||
 | 
					#cdist_file /etc/issue --via my_func
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										26
									
								
								conf/lib/cdist_explore_pkg_system
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										26
									
								
								conf/lib/cdist_explore_pkg_system
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -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 <http://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cdist_explore_pkg_system()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					#   case $(cdist_explore_os)
 | 
				
			||||||
 | 
					   :
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -19,7 +19,7 @@
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cdist_package()
 | 
					cdist_package_install()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue