forked from ungleich-public/cdist
		
	add --recursive to __directory (man, gencode, parameter, changelog)
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								e921986e32
							
						
					
				
			
			
				commit
				
					
						e4190c3d0a
					
				
			
		
					 4 changed files with 20 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -36,6 +36,12 @@ if [ -f "$__object/parameter/parents" ]; then
 | 
			
		|||
   fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ -f "$__object/parameter/recursive" ]; then
 | 
			
		||||
   if [ yes = "$(cat "$__object/parameter/recursive")" ]; then
 | 
			
		||||
      recursive="-R"
 | 
			
		||||
   fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Only create if not already existent
 | 
			
		||||
if [ no = "$(cat "$__object/explorer/exists")" ]; then
 | 
			
		||||
   echo mkdir $mkdiropt \"$destination\"
 | 
			
		||||
| 
						 | 
				
			
			@ -48,10 +54,10 @@ fi
 | 
			
		|||
 | 
			
		||||
# Group
 | 
			
		||||
if [ -f "$__object/parameter/group" ]; then
 | 
			
		||||
   echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\"
 | 
			
		||||
   echo chgrp $recursive \"$(cat "$__object/parameter/group")\" \"$destination\"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Owner
 | 
			
		||||
if [ -f "$__object/parameter/owner" ]; then
 | 
			
		||||
   echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\"
 | 
			
		||||
   echo chown $recursive \"$(cat "$__object/parameter/owner")\" \"$destination\"
 | 
			
		||||
fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,6 +32,11 @@ owner::
 | 
			
		|||
parents::
 | 
			
		||||
   Whether to create parents as well (mkdir -p behaviour). Must be yes or no.
 | 
			
		||||
 | 
			
		||||
recursive::
 | 
			
		||||
   If supplied the chgrp and chown call will run recursively.
 | 
			
		||||
   This does *not* influence the behaviour of chmod.
 | 
			
		||||
   Must be yes or no.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
EXAMPLES
 | 
			
		||||
--------
 | 
			
		||||
| 
						 | 
				
			
			@ -45,6 +50,9 @@ __directory /etc --owner root --group root --mode 0755
 | 
			
		|||
 | 
			
		||||
# Create nfs service directory, including parents
 | 
			
		||||
__directory /home/services/nfs --parents yes
 | 
			
		||||
 | 
			
		||||
# Change permissions recursively
 | 
			
		||||
__directory /home/services --recursive yes --owner root --group root
 | 
			
		||||
--------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,3 +2,4 @@ group
 | 
			
		|||
mode
 | 
			
		||||
owner
 | 
			
		||||
parents
 | 
			
		||||
recursive
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,6 @@
 | 
			
		|||
1.3.3:
 | 
			
		||||
	* Add --recursive to __directory
 | 
			
		||||
 | 
			
		||||
1.3.2: 2011-03-21
 | 
			
		||||
	* Add --source to __motd
 | 
			
		||||
	* Add --preseed to __package_apt
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue