forked from ungleich-public/cdist
		
	support debian/ubuntu in __motd
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								710ce98386
							
						
					
				
			
			
				commit
				
					
						49d3548f46
					
				
			
		
					 1 changed files with 12 additions and 2 deletions
				
			
		| 
						 | 
					@ -19,8 +19,6 @@
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
destination=/etc/motd
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Select motd source
 | 
					# Select motd source
 | 
				
			||||||
if [ -f "$__object/parameter/source" ]; then
 | 
					if [ -f "$__object/parameter/source" ]; then
 | 
				
			||||||
   source="$(cat "$__object/parameter/source")"
 | 
					   source="$(cat "$__object/parameter/source")"
 | 
				
			||||||
| 
						 | 
					@ -28,4 +26,16 @@ else
 | 
				
			||||||
   source="$__type/files/motd"
 | 
					   source="$__type/files/motd"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					os=$(cat $__global/explorer/os)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					case "$os" in
 | 
				
			||||||
 | 
					   debian|ubuntu)
 | 
				
			||||||
 | 
					      destination=/etc/motd.tail
 | 
				
			||||||
 | 
					   ;;
 | 
				
			||||||
 | 
					   *)
 | 
				
			||||||
 | 
					      destination=/etc/motd
 | 
				
			||||||
 | 
					   ;;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
__file "$destination" --source "$source" --type file
 | 
					__file "$destination" --source "$source" --type file
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue