forked from ungleich-public/cdist
		
	support --file - in __debconf_set_selections
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								78be159eb7
							
						
					
				
			
			
				commit
				
					
						9049a1421c
					
				
			
		
					 2 changed files with 14 additions and 3 deletions
				
			
		|  | @ -1,6 +1,6 @@ | |||
| #!/bin/sh | ||||
| # | ||||
| # 2011 Nico Schottelius (nico-cdist at schottelius.org) | ||||
| # 2011-2014 Nico Schottelius (nico-cdist at schottelius.org) | ||||
| # | ||||
| # This file is part of cdist. | ||||
| # | ||||
|  | @ -21,6 +21,12 @@ | |||
| # Setup selections | ||||
| # | ||||
| 
 | ||||
| filename"$(cat "$__object/parameter/file")" | ||||
| 
 | ||||
| if [ "$filename" = "-" ]; then | ||||
|     filename="$__object/stdin" | ||||
| fi | ||||
| 
 | ||||
| echo "debconf-set-selections << __file-eof" | ||||
| cat "$(cat "$__object/parameter/file")" | ||||
| cat "$(cat "$filename")" | ||||
| echo "__file-eof" | ||||
|  |  | |||
|  | @ -18,6 +18,7 @@ REQUIRED PARAMETERS | |||
| ------------------- | ||||
| file:: | ||||
|    Use the given filename as input for debconf-set-selections(1) | ||||
|    If filename is "-", read from stdin. | ||||
| 
 | ||||
| 
 | ||||
| EXAMPLES | ||||
|  | @ -29,6 +30,10 @@ __debconf_set_selections nslcd --file /path/to/file | |||
| 
 | ||||
| # Setup configuration for nslcd from another type | ||||
| __debconf_set_selections nslcd --file "$__type/files/preseed/nslcd" | ||||
| 
 | ||||
| __debconf_set_selections nslcd --file - << eof | ||||
| gitolite gitolite/gituser string git | ||||
| eof | ||||
| -------------------------------------------------------------------------------- | ||||
| 
 | ||||
| 
 | ||||
|  | @ -41,5 +46,5 @@ SEE ALSO | |||
| 
 | ||||
| COPYING | ||||
| ------- | ||||
| Copyright \(C) 2011-2013 Nico Schottelius. Free use of this software is | ||||
| Copyright \(C) 2011-2014 Nico Schottelius. Free use of this software is | ||||
| granted under the terms of the GNU General Public License version 3 (GPLv3). | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue