add "preos" subcommand to generate preos
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								321b39ee89
							
						
					
				
			
			
				commit
				
					
						65cab0d0e8
					
				
			
		
					 2 changed files with 71 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -26,6 +26,7 @@ def commandline():
 | 
			
		|||
 | 
			
		||||
    import cdist.banner
 | 
			
		||||
    import cdist.config
 | 
			
		||||
    import cdist.preos
 | 
			
		||||
    import cdist.shell
 | 
			
		||||
 | 
			
		||||
    # Construct parser others can reuse
 | 
			
		||||
| 
						 | 
				
			
			@ -83,6 +84,15 @@ def commandline():
 | 
			
		|||
         default=cdist.REMOTE_EXEC)
 | 
			
		||||
    parser['config'].set_defaults(func=cdist.config.Config.commandline)
 | 
			
		||||
 | 
			
		||||
    # PreOS
 | 
			
		||||
    parser['preos'] = parser['sub'].add_parser('preos', 
 | 
			
		||||
        parents=[parser['loglevel']])
 | 
			
		||||
    parser['preos'].add_argument('-a', '--arch',
 | 
			
		||||
         help='Select architecture for preos', default="amd64")
 | 
			
		||||
    parser['preos'].add_argument('target_dir', nargs=1,
 | 
			
		||||
        help='Select target directory')
 | 
			
		||||
    parser['preos'].set_defaults(func=cdist.preos.PreOS.commandline)
 | 
			
		||||
 | 
			
		||||
    # Shell
 | 
			
		||||
    parser['shell'] = parser['sub'].add_parser('shell', 
 | 
			
		||||
        parents=[parser['loglevel']])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue