Skip to content
Snippets Groups Projects
customizeChroot 1.16 KiB
Newer Older
  • Learn to ignore specific revisions
  • #!@BINDIR@/bash
    
    Eric Vidal's avatar
    Eric Vidal committed
    # Copyright (c) 2015-2019Eric Vidal <eric@obarun.org>
    
    # All rights reserved.
    # 
    # This file is part of Obarun. It is subject to the license terms in
    # the LICENSE file found in the top-level directory of this
    
    Eric Vidal's avatar
    Eric Vidal committed
    # distribution.
    
    # This file may not be copied, modified, propagated, or distributed
    # except according to the terms contained in the LICENSE file.
    
    sourcing(){
    	
    	local list
    	
    	for list in /tmp/obarun-install-tmp/install.conf /usr/lib/obarun/util.sh; do
    		if [[ -f "${list}" ]]; then
    			source "${list}"
    		else
    			out_error "Missing file : ${list}"
    			exit	
    		fi
    	done
    	
    	unset list
    }
    sourcing
    
    custo_once() {
    	local _tmp cmd
    	cmd="${1}"
    	_tmp="/tmp/obarun-install-tmp"
    	
    	if [[ ! -d $_tmp ]]; then
    		mkdir -p -m0755 $_tmp || die "Impossible to create $_tmp"
    	fi
        if [[ ! -e $_tmp/customize.${cmd} ]]; then
            "${cmd}" || die "Cannot execute $_"
            touch $_tmp/customize.${cmd}
        else
    		return
    	fi
        unset _tmp
    }
    
    ############################## only modifie this script after this line ############################
    
    
    Eric Vidal's avatar
    Eric Vidal committed
    config(){
    
    	out_action "Enable dhcpd service"
    
    Eric Vidal's avatar
    Eric Vidal committed
    	66-enable -v3 dhcpcd
    
    Eric Vidal's avatar
    Eric Vidal committed
    custo_once config
    
    
    out_valid "Customization terminate"