big rename
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								53b21178f7
							
						
					
				
			
			
				commit
				
					
						bf540836f8
					
				
			
		
					 16 changed files with 55 additions and 45 deletions
				
			
		
							
								
								
									
										3
									
								
								Makefile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								Makefile
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,3 @@
 | 
				
			||||||
 | 
					sync:
 | 
				
			||||||
 | 
						.rsync lyni@tablett:cdist
 | 
				
			||||||
 | 
						.rsync nicosc@free.ethz.ch:cdist
 | 
				
			||||||
| 
						 | 
					@ -27,23 +27,28 @@
 | 
				
			||||||
: ${CDIST_HOSTS:=$CDIST_CONFIG/hosts}
 | 
					: ${CDIST_HOSTS:=$CDIST_CONFIG/hosts}
 | 
				
			||||||
: ${CDIST_MODULES:=$CDIST_CONFIG/modules}
 | 
					: ${CDIST_MODULES:=$CDIST_CONFIG/modules}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set -e
 | 
					cdist_debug_echo()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					   [ "$CDIST_DEBUG" ] && echo "Debug: $@"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					: ${CDIST_TMP:=$(mktemp /tmp/cdist.XXXXXXXXXXXX)}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# load libraries so every program has them available
 | 
					# load libraries so every program has them available
 | 
				
			||||||
__cdist_cur="$(pwd -P)"
 | 
					find "${CDIST_LIBDIR}" -type f > "${CDIST_TMP}"
 | 
				
			||||||
cd "${CDIST_LIBDIR}"
 | 
					while read __cdist_lib; do
 | 
				
			||||||
for __cdist_lib in *; do
 | 
					   cdist_debug_echo "Loading $__cdist_lib ..."
 | 
				
			||||||
   . "./${__cdist_lib}"
 | 
					   . "${__cdist_lib}"
 | 
				
			||||||
done
 | 
					done < "${CDIST_TMP}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# load modules
 | 
					# load modules, all parts
 | 
				
			||||||
cd "${CDIST_MODULES}"
 | 
					#find "${CDIST_MODULES}" -name manifest > "${CDIST_TMP}"
 | 
				
			||||||
for __cdist_mod in *; do
 | 
					 | 
				
			||||||
   . "./${__cdist_mod}/manifest"
 | 
					 | 
				
			||||||
done
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#set +e
 | 
				
			||||||
set +e
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#echo $CDIST_CONFIG
 | 
					#echo $CDIST_CONFIG
 | 
				
			||||||
#echo $CDIST_LIBDIR
 | 
					# FIXME: here or somewhere else? other parts may reuse tmp
 | 
				
			||||||
 | 
					rm -f $CDIST_TMP
 | 
				
			||||||
 | 
					#__cdist_cur="$(pwd -P)"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,7 +21,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. cdist-config
 | 
					. cdist-config
 | 
				
			||||||
 | 
					
 | 
				
			||||||
find "${CDIST_LIBDIR}" -type f -name cdist_explore\* > "${CDIST_TMP}"
 | 
					find "${CDIST_LIBDIR}" -type f -name cdist_explore\*.sh > "${CDIST_TMP}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
while read funcfull; do
 | 
					while read funcfull; do
 | 
				
			||||||
   sh="${funcfull##*/}"
 | 
					   sh="${funcfull##*/}"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,15 @@ Before initial release, document:
 | 
				
			||||||
         to a subdirectory named "files"
 | 
					         to a subdirectory named "files"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Architecture
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 - User write shell scripts, which are run on the server
 | 
				
			||||||
 | 
					 - Shell scripts call cdist functions
 | 
				
			||||||
 | 
					 - cdist functions generate cconfig, which can be verified
 | 
				
			||||||
 | 
					 - if verified, generate "command file" to execute on the client
 | 
				
			||||||
 | 
					   - client only sees the commands
 | 
				
			||||||
 | 
					   - no special requirements on the client
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## next: cdist-deploy-to
 | 
					## next: cdist-deploy-to
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   - sync conf/{lib/,modules,host/$name}
 | 
					   - sync conf/{lib/,modules,host/$name}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,9 @@
 | 
				
			||||||
 | 
					# works
 | 
				
			||||||
cdist_package install vim zsh rxvt-unicode
 | 
					cdist_package install vim zsh rxvt-unicode
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# works
 | 
				
			||||||
cdist_file files/notebook /etc/nicos_notebook
 | 
					cdist_file files/notebook /etc/nicos_notebook
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#collectd
 | 
					#collectd
 | 
				
			||||||
#cdist_file /etc/issue issue 
 | 
					#cdist_file /etc/issue issue 
 | 
				
			||||||
#cdist_file /etc/issue --via my_func
 | 
					#cdist_file /etc/issue --via my_func
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,29 +0,0 @@
 | 
				
			||||||
#!/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_os()
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
   [ -f /etc/arch-release ] && echo archlinux
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   [ -f /etc/debian_version ] && echo debian
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null && echo ubuntu
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -25,7 +25,7 @@ cdist_package()
 | 
				
			||||||
   backend="$(cdist_package_select_backend)"
 | 
					   backend="$(cdist_package_select_backend)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   case "$1" in
 | 
					   case "$1" in
 | 
				
			||||||
      install|uninstall)
 | 
					      install|is_installed|uninstall)
 | 
				
			||||||
         operation="$1"; shift
 | 
					         operation="$1"; shift
 | 
				
			||||||
         ${backend}_${operation} "$@"
 | 
					         ${backend}_${operation} "$@"
 | 
				
			||||||
      ;;
 | 
					      ;;
 | 
				
			||||||
							
								
								
									
										5
									
								
								conf/modules/efsh/manifest
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								conf/modules/efsh/manifest
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					efsh()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					   cdist_dir /home/services /home/users /home/groups
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										12
									
								
								doc/internal/logs/2010-09-25
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								doc/internal/logs/2010-09-25
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,12 @@
 | 
				
			||||||
 | 
					[12:15] kr:cdist% CDIST_DEBUG=1 cdist-config
 | 
				
			||||||
 | 
					Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_dir.sh ...
 | 
				
			||||||
 | 
					Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_explore_hostname.sh ...
 | 
				
			||||||
 | 
					Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_explore_os.sh ...
 | 
				
			||||||
 | 
					Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_explore_pkg_system.sh ...
 | 
				
			||||||
 | 
					Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_file.sh ...
 | 
				
			||||||
 | 
					Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_package.sh ...
 | 
				
			||||||
 | 
					Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_package_backend_pacman_install.sh ...
 | 
				
			||||||
 | 
					Debug: Loading /home/users/nico/p/cdist/conf/lib/cdist_package_select_backend.sh ...
 | 
				
			||||||
 | 
					[12:15] kr:cdist% cdist-config              
 | 
				
			||||||
 | 
					[12:15] kr:cdist% 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								doc/internal/profile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								doc/internal/profile
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					export PATH=$PATH:$HOME/cdist/bin
 | 
				
			||||||
 | 
					export CDIST_CONFIG=$HOME/cdist/conf
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue