forked from ungleich-public/cdist
		
	some new ideas/comments
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								1e59e13519
							
						
					
				
			
			
				commit
				
					
						91f0f41845
					
				
			
		
					 2 changed files with 10 additions and 1 deletions
				
			
		| 
						 | 
					@ -31,7 +31,7 @@ set -au
 | 
				
			||||||
export cdist_types="file service user"
 | 
					export cdist_types="file service user"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# the file that contains mapping from hosts to types
 | 
					# the file that contains mapping from hosts to types
 | 
				
			||||||
# we will execute this later
 | 
					# we will execute this later -- call this MANIFEST?
 | 
				
			||||||
cdist_config_base="./cdist_config_base"
 | 
					cdist_config_base="./cdist_config_base"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cdist_tree_wrapper="./cdist_tree_wrapper"
 | 
					cdist_tree_wrapper="./cdist_tree_wrapper"
 | 
				
			||||||
| 
						 | 
					@ -56,6 +56,8 @@ rm -rf "${tmpdir}"
 | 
				
			||||||
# contains cdist-tree binaries
 | 
					# contains cdist-tree binaries
 | 
				
			||||||
mkdir -p "${cdist_bindir}"
 | 
					mkdir -p "${cdist_bindir}"
 | 
				
			||||||
#ln -s "${cdist_tree_wrapper_abs}" "${bindir}"
 | 
					#ln -s "${cdist_tree_wrapper_abs}" "${bindir}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Create our binaries, will are called from the manifest - temporary
 | 
				
			||||||
(
 | 
					(
 | 
				
			||||||
   set -e
 | 
					   set -e
 | 
				
			||||||
   cd "${cdist_bindir}"
 | 
					   cd "${cdist_bindir}"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,9 @@
 | 
				
			||||||
# 
 | 
					# 
 | 
				
			||||||
# Wrapper script that generates cconfig from arguments
 | 
					# Wrapper script that generates cconfig from arguments
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					# This script will be called everytime the manifest decides to create
 | 
				
			||||||
 | 
					# a new type
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. cdist-config
 | 
					. cdist-config
 | 
				
			||||||
| 
						 | 
					@ -40,6 +43,7 @@ ddir="${cdist_confdir}/${tid}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -e "${ddir}" ]; then
 | 
					if [ -e "${ddir}" ]; then
 | 
				
			||||||
   # FIXME: add source! $cdist_config_base/source
 | 
					   # FIXME: add source! $cdist_config_base/source
 | 
				
			||||||
 | 
					   # FIXME: force $source information to be present from outside!
 | 
				
			||||||
   __cdist_usage "${tid} already exists"
 | 
					   __cdist_usage "${tid} already exists"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,6 +56,9 @@ while [ $# -gt 0 ]; do
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   opt_file="$(echo $opt | sed 's/^--//')"
 | 
					   opt_file="$(echo $opt | sed 's/^--//')"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   # FIXME: check for options supported by type - or leave it to the type?
 | 
				
			||||||
 | 
					   # I guess do it here, so we also check whether
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   [ $# -ge 1 ] || __cdist_usage "Missing value for $opt"
 | 
					   [ $# -ge 1 ] || __cdist_usage "Missing value for $opt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   value="$1"; shift
 | 
					   value="$1"; shift
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue